Hello, thank you for the useful addon NumberField.
I am using org.vaadin.ui.numberfield 0.2.0 with Vaadin 8
When used with the com.vaadin.data.Binder and bound to an Integer field on an entity, I receive the following exception:
java.lang.NumberFormatException: For input string: "2,003"
at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:2043)
at sun.misc.FloatingDecimal.parseDouble(FloatingDecimal.java:110)
at java.lang.Double.parseDouble(Double.java:538)
at java.lang.Double.valueOf(Double.java:502)
at org.vaadin.ui.NumberField.getValueAsFormattedDecimalNumber(NumberField.java:320)
at org.vaadin.ui.NumberField.updateFormattedValue(NumberField.java:307)
at org.vaadin.ui.NumberField.lambda$0(NumberField.java:173)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:510)
at com.vaadin.event.EventRouter.fireEvent(EventRouter.java:211)
at com.vaadin.event.EventRouter.fireEvent(EventRouter.java:174)
at com.vaadin.server.AbstractClientConnector.fireEvent(AbstractClientConnector.java:1033)
at com.vaadin.ui.AbstractField.setValue(AbstractField.java:144)
at com.vaadin.ui.AbstractTextField.setValue(AbstractTextField.java:98)
at com.vaadin.ui.AbstractTextField.setValue(AbstractTextField.java:47)
at com.vaadin.data.Binder$BindingImpl.initFieldValue(Binder.java:893)
at com.vaadin.data.Binder$BindingImpl.access$100(Binder.java:766)
at com.vaadin.data.Binder$BindingBuilderImpl.bind(Binder.java:593)
at com.cffnow.ui.controls.editors.base.IFieldRegistrarAspect.registerField(IFieldRegistrarAspect.java:29)
at com.cffnow.ui.controls.editors.equipment.components.EquipmentEditor.getYearField(EquipmentEditor.java:288)
So the integer value is 2003, but for some reason a comma is appearing, and causing a NumberFormatException.
I verified that when the value's length is 3 or less, this is not an issue.
Hello, thank you for the useful addon NumberField.
I am using org.vaadin.ui.numberfield 0.2.0 with Vaadin 8
When used with the com.vaadin.data.Binder and bound to an Integer field on an entity, I receive the following exception:
So the integer value is 2003, but for some reason a comma is appearing, and causing a NumberFormatException.
I verified that when the value's length is 3 or less, this is not an issue.