ComboBox 类中没有 select 方法。还有其他方法可以在 Vaadin 组合框中预选项目吗?这是我的代码:
final ComboBox<ReportTypeEnum> selectionBox = new ComboBox<>("Rapporttyp");
selectionBox.setWidthFull();
selectionBox.setItems(getPatentNationalReportTypeList());
selectionBox.addValueChangeListener(e -> setVisibilityOfGenerateReportTypeButton());
当
ComboBox
实现 HasValue
时,你必须调用 setValue()
HasValue
由代表值的所有组件使用:
https://vaadin.com/api/platform/current/com/vaadin/flow/component/HasValue.html