I see on the ‘issues tracker’ that there is an issue on Numbers, so I think the problem is on the component, if I’m wrong, please correct me. For the moment I ‘fix it’ with a CustomField, but I know this will be useless the moment this is fixed:
public class PrizeField extends CustomField<String> {
private final NumberField numberField = new NumberField();
public PrizeField(){
numberField.setPrefixComponent(VaadinIcon.MONEY.create());
numberField.setHasControls(true);
numberField.setMin(100.00);
numberField.setMax(100000.00);
numberField.setStep(100.00);
numberField.setValue(100.00);
numberField.setErrorMessage("Premio no puede ser cero.");
numberField.setWidthFull();
add(numberField);
}
@Override
protected String generateModelValue() {
return numberField.getValue().toString();
}
@Override
protected void setPresentationValue(String doubleVal) {
numberField.setValue( Double.valueOf(doubleVal) );
}
...
}