Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Struts 2 »

[S2] Submitting a Double => problem of Locale

MLENEVEUT

2007-08-06



Hi,

When I submit a numeric in a form, the validation accepts only comma
numbers (12,34) (I'm with a French locale). If a set 12.34, the validation
failed and I have the message : "Invalid field value for field "xx""

But when a submit 12,34 and another field has an error, it comes back to my
JSP with 12.34 as my number's value. So when I correct the field with the
error and
re-submit, the numeric field has now an error.

Where is the problem ? My field is a Double in my bean.

How can I correct the problem ? In an Intercetor ? (extending
ParametersInterceptor ?)

And How could I change the default message "Invalid field value for field
"xx"" ? What is the key to override in my package_xx.properties ?

Thanks a lot.
--
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

©2008 junlu.com - Jax Systems, LLC, U.S.A.