Search in sources :

Example 1 with SplitTextField

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;
}
Also used : SplitTextField(au.com.vaadinutils.crud.splitFields.SplitTextField) TextField(com.vaadin.ui.TextField) SplitTextField(au.com.vaadinutils.crud.splitFields.SplitTextField)

Example 2 with SplitTextField

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;
}
Also used : SplitTextField(au.com.vaadinutils.crud.splitFields.SplitTextField) TextField(com.vaadin.ui.TextField) SplitTextField(au.com.vaadinutils.crud.splitFields.SplitTextField) HorizontalLayout(com.vaadin.ui.HorizontalLayout)

Aggregations

SplitTextField (au.com.vaadinutils.crud.splitFields.SplitTextField)2 TextField (com.vaadin.ui.TextField)2 HorizontalLayout (com.vaadin.ui.HorizontalLayout)1