Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 321816 - databinding: numbers are automatically formatted
Summary: databinding: numbers are automatically formatted
Status: RESOLVED WONTFIX
Alias: None
Product: XWT
Classification: Technology
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-05 02:09 EDT by moritzpavlik CLA
Modified: 2013-01-24 15:31 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.