Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community Forumsinteger databinding: thousands separator
https://www.eclipse.org/forums/index.php/mv/msg/182869/579984/#msg_579984
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.]]>Mo P.2010-08-04T13:24:09-00:00Re: integer databinding: thousands separator
https://www.eclipse.org/forums/index.php/mv/msg/182869/580008/#msg_580008
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.]]>Yves YANG2010-08-04T22:38:24-00:00Re: integer databinding: thousands separator
https://www.eclipse.org/forums/index.php/mv/msg/182869/580027/#msg_580027
I filed a bug for that problem: https://bugs.eclipse.org/bugs/show_bug.cgi?id=321816]]>Mo P.2010-08-05T06:11:55-00:00Re: integer databinding: thousands separator
https://www.eclipse.org/forums/index.php/mv/msg/182869/580051/#msg_580051
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