Hello Gunter,
I saw your mail yesterday, but wanted to see if anyone had a better solution than I.
AFAIK there's no easy way; we had a similar problem (can't control whether the users enter numbers European-style or North American-style). We wrote our own FormValidatorAction (which we use to validate dates as well); in the validateValue(String name,
Configuration constraints, Configuration conf, Map params,
boolean isString, String type) method we added code to validate the "special" types we wanted, for example:
else if ("jdouble".equals(type)) {
String strValue = value.toString();
strValue = strValue.replace(',', '.');
params.put(name, strValue);
vaH = super.validateValue(name, constraints, conf, params, isString, "double");
}
Then we can use the type "jdouble" in our form-validation descriptor. Of course, more elegant solutions must be possible!
Hope this helps!
Regards,
John
Gunter D'Hondt wrote:
Isn't anybody who knows how I can change the general decimal and thousand seperator in a Cocoon application? How to switch them?
I've tried the LocaleAction but this only gives you the locale as a parameter in your sitemap so that no use for decimal formatting
Any help is welcome!
Regards, Gunter D'Hondt
-- --------------------------------------------------------- Jentro Technologies GmbH John L. Webber, Software Development ---------------------------------------------------------
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
