Reputation: 332
There is no select method in the ComboBox class. Is there any other to preselect an item in a Vaadin Combobox? This is my code:
final ComboBox<ReportTypeEnum> selectionBox = new ComboBox<>("Rapporttyp");
selectionBox.setWidthFull();
selectionBox.setItems(getPatentNationalReportTypeList());
selectionBox.addValueChangeListener(e -> setVisibilityOfGenerateReportTypeButton());
Upvotes: 0
Views: 33
Reputation: 36223
As ComboBox
implements HasValue
you have to call setValue()
HasValue
is used by all components that represent a Value:
https://vaadin.com/api/platform/current/com/vaadin/flow/component/HasValue.html
Upvotes: 2