Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » integer databinding: thousands separator
integer databinding: thousands separator [message #550832] Wed, 04 August 2010 13:24 Go to next message
Mo P. is currently offline Mo P.
Messages: 24
Registered: July 2010
Junior Member
Hello,

I'm still working with XWT and this time I got the following problem Wink

An example:
I have a person pojo, that has an age attribute, which is an integer. Now when it comes to databinding, I bind that attribute to a text field via XWT, which works fine Smile
But if the person's age is greater than 999, there is added a thousands separator automatically: If the int value is 123456, the text field has the text "123.456". How can I disable this behavior? Is is actually wanted?
Thanks in advance

Best Regards
Moritz

PS: Somebody could help me with my CSS problem post please? It is a feature, that I would really like to include.
Re: integer databinding: thousands separator [message #551038 is a reply to message #550832] Wed, 04 August 2010 22:38 Go to previous messageGo to next message
Yves YANG is currently offline Yves YANG
Messages: 687
Registered: July 2009
Senior Member
Please fill a bug!

Best regards
Yves YANG
"Mo P." <moritzpavlik@gmx.de> wrote in message
news:i3bplo$j5j$1@build.eclipse.org...
> Hello,
>
> I'm still working with XWT and this time I got the following problem ;)
>
> An example:
> I have a person pojo, that has an age attribute, which is an integer. Now
> when it comes to databinding, I bind that attribute to a text field via
> XWT, which works fine :)
> But if the person's age is greater than 999, there is added a thousands
> separator automatically: If the int value is 123456, the text field has
> the text "123.456". How can I disable this behavior? Is is actually
> wanted?
> Thanks in advance
>
> Best Regards
> Moritz
>
> PS: Somebody could help me with my CSS problem post please? It is a
> feature, that I would really like to include.
Re: integer databinding: thousands separator [message #551071 is a reply to message #550832] Thu, 05 August 2010 06:11 Go to previous messageGo to next message
Mo P. is currently offline Mo P.
Messages: 24
Registered: July 2010
Junior Member
Thank you very much for your fast replies!

I filed a bug for that problem:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=321816
Re: integer databinding: thousands separator [message #551109 is a reply to message #551071] Thu, 05 August 2010 09:35 Go to previous message
Yves YANG is currently offline Yves YANG
Messages: 687
Registered: July 2009
Senior Member
Thanks. here is my respons I replied on the bug:

You can disable it by overriding the default convertor. There are two
solutions:
1. Override the system default convertor
XWT.registerConvertor(IConvertor)
2. set up a local convertor in the binding
text="{binding path=age,convertor=MyIntConvertor}"
The MyIntConvertor must implement IValueConvertor

Best regards
Yves YANG
"Mo P." <moritzpavlik@gmx.de> wrote in message
news:i3dknb$q40$1@build.eclipse.org...
> Thank you very much for your fast replies!
>
> I filed a bug for that problem:
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=321816
Previous Topic:XWT and CSS: Warning - could not initialize CSS styling : org.eclipse.e4.xwt.css.CSSEngineNotFoundEx
Next Topic:integer databinding: thousands separator
Goto Forum:
  


Current Time: Sat Oct 25 03:03:07 GMT 2014

Powered by FUDForum. Page generated in 0.02076 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software