Java Code Examples for com.vaadin.ui.ComboBox#select()
The following examples show how to use
com.vaadin.ui.ComboBox#select() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: InputOutputUI.java From chipster with MIT License | 5 votes |
protected void initElements() { type2 = new ComboBox(); type2.setImmediate(true); type2.setWidth(WIDTH); lbMeta = new Label("Meta:"); cbMeta = new CheckBox(); cbMeta.setDescription("Is this element Meta data"); optional.setWidth(WIDTH); type = new ComboBox(); type.setWidth(WIDTH); type.setNullSelectionAllowed(false); type.setImmediate(true); type.addItem(SINGLE_FILE); type.addItem(MULTI_FILE); type.select(SINGLE_FILE); type.addValueChangeListener(new ValueChangeListener() { private static final long serialVersionUID = -1134955257251483403L; @Override public void valueChange(ValueChangeEvent event) { if(type.getValue().toString().contentEquals(SINGLE_FILE)) { getSingleFileUI(); } else if(type.getValue().toString().contentEquals(MULTI_FILE)){ getMultipleFilesUI(); } } }); }