Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 321816

Summary: databinding: numbers are automatically formatted
Product: [Technology] XWT Reporter: moritzpavlik
Component: CoreAssignee: Project Inbox <e4.xwt-inbox>
Status: RESOLVED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: yves.yang
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description moritzpavlik CLA 2010-08-05 02:09:47 EDT
Build Identifier: 20100617-1415

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".
I recognized that the same happens with double values, it seems that number values are automatically formatted according to the locale. It is actually a nice feature but it should be possible to disable.

Reproducible: Always
Comment 1 Yves YANG CLA 2010-08-05 05:32:37 EDT
You can disable it by override 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
Comment 2 Yves YANG CLA 2012-03-10 20:10:25 EST
It is by design.