I’m trying to add IntegerFields to a custom form that extends FormLayout (shortened):
public class TestForm extends FormLayout {
private IntegerField ew = new IntegerField("EW");
private IntegerField aw = new IntegerField("AW");
private IntegerField rw = new IntegerField("RW");
private IntegerField be = new IntegerField("BE");
private Button save = new Button("Save");
private Button delete = new Button("Delete");
private Button close = new Button("Cancel");
Binder<Test> binder = new BeanValidationBinder<>(Test.class);
public TestForm() {
binder.bindInstanceFields(this);
add(ew, aw, rw, be,
createButtonsLayout());
}
However, these fields do not show in the UI, only the buttons are visible. TextField, TextArea and ComboBox work as expected. Is it somehow not possible to add IntegerFields or NumberFields in general to FormLayout? If so, why? If not: what am I doing wrong?
For the record: I’m using vaadin 14.1.25