use of com.vaadin.ui.ComboBox in project VaadinUtils by rlsutton1.
the class FormHelper method bindEnumField.
public ComboBox bindEnumField(String fieldLabel, String fieldName, Class<?> clazz) {
ComboBox field = bindEnumField(form, group, fieldLabel, fieldName, clazz);
this.fieldList.add(field);
return field;
}
use of com.vaadin.ui.ComboBox in project VaadinUtils by rlsutton1.
the class FormHelper method bindEnumField.
public ComboBox bindEnumField(ComboBox comboBox, AbstractLayout form, ValidatingFieldGroup<E> group, String fieldLabel, String fieldName, Class<?> clazz) {
ComboBox field = comboBox;
field.setCaption(fieldLabel);
field.setContainerDataSource(createContainerFromEnumClass(fieldName, clazz));
field.setItemCaptionPropertyId(fieldName);
// field.setCaption(fieldLabel);
field.setNewItemsAllowed(false);
field.setNullSelectionAllowed(false);
field.setTextInputAllowed(true);
field.setWidth(STANDARD_COMBO_WIDTH);
field.setPopupWidth("100%");
field.setImmediate(true);
field.setId(fieldLabel.replace(" ", ""));
addValueChangeListeners(field);
doBinding(group, fieldName, field);
form.addComponent(field);
return field;
}
use of com.vaadin.ui.ComboBox in project VaadinUtils by rlsutton1.
the class FormHelper method bindComboBox.
public <L> ComboBox bindComboBox(AbstractLayout form, ValidatingFieldGroup<E> fieldGroup, String fieldName, String fieldLabel, Container options) {
ComboBox field = new SplitComboBox(fieldLabel, options);
field.setNewItemsAllowed(false);
field.setNullSelectionAllowed(false);
field.setTextInputAllowed(true);
field.setWidth(STANDARD_COMBO_WIDTH);
field.setPopupWidth("100%");
field.setImmediate(true);
form.addComponent(field);
addValueChangeListeners(field);
doBinding(group, fieldName, field);
return field;
}
use of com.vaadin.ui.ComboBox in project VaadinUtils by rlsutton1.
the class FormHelper method bindEnumField.
public <M> ComboBox bindEnumField(AbstractLayout form, ValidatingFieldGroup<E> group, String fieldLabel, SingularAttribute<E, M> member, Class<?> clazz) {
ComboBox field = bindEnumField(form, group, fieldLabel, member.getName(), clazz);
this.fieldList.add(field);
return field;
}
use of com.vaadin.ui.ComboBox in project VaadinUtils by rlsutton1.
the class MultiColumnFormLayout method bindEnumField.
public <M> ComboBox bindEnumField(String fieldLabel, SingularAttribute<E, M> member, Class<?> clazz) {
ComboBox field = formHelper.bindEnumField(this, fieldGroup, fieldLabel, member, clazz);
this.fieldList.add(field);
return field;
}
Aggregations