Search in sources :

Example 31 with ComboBox

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;
}
Also used : SplitComboBox(au.com.vaadinutils.crud.splitFields.SplitComboBox) LegacySplitComboBox(au.com.vaadinutils.crud.splitFields.legacy.LegacySplitComboBox) ComboBox(com.vaadin.ui.ComboBox) LegacyComboBox(org.vaadin.ui.LegacyComboBox)

Example 32 with ComboBox

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;
}
Also used : SplitComboBox(au.com.vaadinutils.crud.splitFields.SplitComboBox) LegacySplitComboBox(au.com.vaadinutils.crud.splitFields.legacy.LegacySplitComboBox) ComboBox(com.vaadin.ui.ComboBox) LegacyComboBox(org.vaadin.ui.LegacyComboBox)

Example 33 with ComboBox

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;
}
Also used : SplitComboBox(au.com.vaadinutils.crud.splitFields.SplitComboBox) LegacySplitComboBox(au.com.vaadinutils.crud.splitFields.legacy.LegacySplitComboBox) ComboBox(com.vaadin.ui.ComboBox) LegacyComboBox(org.vaadin.ui.LegacyComboBox) SplitComboBox(au.com.vaadinutils.crud.splitFields.SplitComboBox) LegacySplitComboBox(au.com.vaadinutils.crud.splitFields.legacy.LegacySplitComboBox)

Example 34 with ComboBox

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;
}
Also used : SplitComboBox(au.com.vaadinutils.crud.splitFields.SplitComboBox) LegacySplitComboBox(au.com.vaadinutils.crud.splitFields.legacy.LegacySplitComboBox) ComboBox(com.vaadin.ui.ComboBox) LegacyComboBox(org.vaadin.ui.LegacyComboBox)

Example 35 with ComboBox

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;
}
Also used : ComboBox(com.vaadin.ui.ComboBox)

Aggregations

ComboBox (com.vaadin.ui.ComboBox)41 HorizontalLayout (com.vaadin.ui.HorizontalLayout)7 TextField (com.vaadin.ui.TextField)7 Button (com.vaadin.ui.Button)6 SplitComboBox (au.com.vaadinutils.crud.splitFields.SplitComboBox)5 LegacySplitComboBox (au.com.vaadinutils.crud.splitFields.legacy.LegacySplitComboBox)5 Item (com.vaadin.data.Item)5 Label (com.vaadin.ui.Label)5 VerticalLayout (com.vaadin.ui.VerticalLayout)5 Test (org.junit.Test)4 LegacyComboBox (org.vaadin.ui.LegacyComboBox)4 ValueChangeEvent (com.vaadin.data.Property.ValueChangeEvent)3 ClickEvent (com.vaadin.ui.Button.ClickEvent)3 Panel (com.vaadin.ui.Panel)3 UI (com.vaadin.ui.UI)3 LinkkiComboBox (org.linkki.core.ui.components.LinkkiComboBox)3 TimePicker (au.com.vaadinutils.layout.TimePicker)2 ViewRiksdagenCommittee (com.hack23.cia.model.internal.application.data.committee.impl.ViewRiksdagenCommittee)2 ApplicationEventGroup (com.hack23.cia.model.internal.application.system.impl.ApplicationEventGroup)2 DataContainer (com.hack23.cia.service.api.DataContainer)2