Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Validation error after format number and date globally

Truong Van HoangJun 17 2014 — edited Jun 26 2014

Hi all,

I format all date fields in may app by adding the formatting-locale tag in trinidad-config.xml (<formatting-locale>en-GB</formatting-locale>),

follow idea in this page http://soadev.blogspot.ch/2010/03/change-global-date-format-of-your.html

Then I format (0.00) all my number fields by extends ViewRowAttrHintsImpl class (override getFormat, getFormattedAttribute, getFormatter, getFormatterClassName methods),

follow idea in this page http://andrejusb.blogspot.ch/2014/05/implementing-dynamic-date-type.html

All the date and number fields are showed with correct format, but the validation is wrong for number fields (only work with 'en' locale).

With 'fr' locale, a number field with value 559,40 (',' is decimal seperator).

But when I try to save the same value 559,40 to the field, this error is showed 'Le format du nombre doit correspondre au modèle suivant : 0.00'

And when I try to save value 559.40, this error is showed 'For input string: "9,"'

If I remove the formatting-locale tag, the validation is correct again but I want to keep the format for date field.

Anyone know any workaround or another solution?

Thanks,

Hoang

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Jul 24 2014
Added on Jun 17 2014
4 comments
340 views