Search in sources :

Example 1 with ListSelect

use of com.vaadin.ui.ListSelect in project opennms by OpenNMS.

the class SimpleViewContribution method getView.

@SuppressWarnings("serial")
@Override
public Component getView(final WidgetContext widgetContext) {
    ListSelect listSelect = new ListSelect("Select a city", cities);
    listSelect.setHeight("100%");
    listSelect.setWidth("100%");
    listSelect.setImmediate(true);
    listSelect.addValueChangeListener(new ValueChangeListener() {

        @Override
        public void valueChange(ValueChangeEvent event) {
            Notification.show("" + event.getProperty());
        }
    });
    return listSelect;
}
Also used : ValueChangeEvent(com.vaadin.data.Property.ValueChangeEvent) ValueChangeListener(com.vaadin.data.Property.ValueChangeListener) ListSelect(com.vaadin.ui.ListSelect)

Aggregations

ValueChangeEvent (com.vaadin.data.Property.ValueChangeEvent)1 ValueChangeListener (com.vaadin.data.Property.ValueChangeListener)1 ListSelect (com.vaadin.ui.ListSelect)1