use of au.com.vaadinutils.crud.splitFields.SplitTextField in project VaadinUtils by rlsutton1.
the class FormHelper method bindTextField.
public TextField bindTextField(AbstractLayout form, ValidatingFieldGroup<E> group, String fieldLabel, String fieldName) {
TextField field = new SplitTextField(fieldLabel);
field.setWidth("100%");
field.setImmediate(true);
field.setNullRepresentation("");
field.setNullSettingAllowed(false);
field.setId(fieldLabel.replace(" ", ""));
addValueChangeListeners(field);
doBinding(group, fieldName, field);
form.addComponent(field);
return field;
}
use of au.com.vaadinutils.crud.splitFields.SplitTextField in project VaadinUtils by rlsutton1.
the class FormHelper method bindTextFieldWithButton.
public TextField bindTextFieldWithButton(AbstractLayout form, ValidatingFieldGroup<E> group, String fieldLabel, String fieldName, Button button) {
HorizontalLayout layout = new HorizontalLayout();
layout.setSizeFull();
TextField field = new SplitTextField(fieldLabel);
field.setWidth("100%");
field.setImmediate(true);
field.setNullRepresentation("");
field.setNullSettingAllowed(false);
field.setId(fieldLabel.replace(" ", ""));
addValueChangeListeners(field);
doBinding(group, fieldName, field);
layout.addComponent(field);
layout.addComponent(button);
layout.setExpandRatio(field, 2);
form.addComponent(layout);
return field;
}
Aggregations