2003-01-15, sze keltezéssel Rod McChesney ezt írta: > This is deeper in the validation code, but I believe that > java.text.DecimalFormat should be used for float > or double parsing. Using Double d = new Double(string) > the way GenericTypeValidator does will not work right in other locales. > > The javadoc for class Double says this in the secion on the > valueOf(String s) method: > > To interpret localized string representations of a > floating-point value, use subclasses of NumberFormat.
I use NumberFormat extensively in converting the String into float. That is fine. Imho the problem is that the validation javascript is static. I don't know how to obtain the current Locale in the script. Maybe I should not try to find it out via javascript but modify the validator framework to generate a string representation as a parameter to the validation function call. The validation script function would know somehow the exception locales to the '.' separators. If there is no other way then even in a constant map. Any ideas? Tib -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

