Nino Saturnino Martinez Vazquez Wael <nino.martinez <at> jayway.dk> writes:
> If I am in US locale numbers are interpreted okay, however if in > european locale they dont. Thats because the value are in US locale so > how do I tell that these two fields should be interpereted as US. I have > tried overiding the getlocale, but it does not seem to work? > > Should I create my own IConverter? Yes, create your own IConverter: class USNumberConverter extends SimpleConverterAdapter { public String toString(Object value) { return NumberFormat.getInstance(Locale.US).format((Number) value); } public Object toObject(String value) { try { return NumberFormat.getInstance(Locale.US) .parse((String) value); } catch (ParseException e) { throw new RuntimeException(e); } } } gMapUpdatingForm.add(new HiddenField("longtitudeNE", ...) { public IConverter getConverter() { return new USNumberConverter(); } }); ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user