ComboBox<String> comboBox = new ComboBox<>(); comboBox.setClearButtonVisible(true); comboBox.addValueChangeListener(e -> { String value = e.getValue(); }); VerticalLayout layout = new VerticalLayout(); layout.add(comboBox); TextField textField = new TextField(); textField.setClearButtonVisible(true); textField.addValueChangeListener(e -> { String value = e.getValue(); }); SuggestionProvider<String> suggestionProvider = new ListDataProvider<>(suggestions); textField.setSuggestionProvider(suggestionProvider); VerticalLayout layout = new VerticalLayout(); layout.add(textField);


上一篇:
下一篇:
切换中文