Hi,
is there a simple way to suppress thousands seperators in TextFields binding double or long values?
Thanks in advance
Hi,
is there a simple way to suppress thousands seperators in TextFields binding double or long values?
Thanks in advance
The easiest way is probably to set a custom Converter with the getFormat method overridden:
myLongField.setConverter(new StringToLongConverter() {
@Override
protected NumberFormat getFormat() {
NumberFormat nf = super.getFormat();
nf.setGrouping(false);
return nf;
}
});
If you want to do this by default for all fields, you can write a custom ConverterFactory and set it using VaadinSession.setConverterFactory().