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.
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.
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