From b505417c828721e67a72581e8bda94fed522769f Mon Sep 17 00:00:00 2001 From: Bruno Rezende Date: Fri, 17 Mar 2023 15:12:16 -0300 Subject: [PATCH 1/2] Removes unused dependency - EnhancedDialog --- autoselectcombobox/pom.xml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/autoselectcombobox/pom.xml b/autoselectcombobox/pom.xml index a3861d6..911959e 100644 --- a/autoselectcombobox/pom.xml +++ b/autoselectcombobox/pom.xml @@ -101,11 +101,6 @@ - - com.vaadin.componentfactory - enhanced-dialog - 23.1.2 - From 36d86abdbeea5cfa3104c0f182b3e2910720b855 Mon Sep 17 00:00:00 2001 From: Bruno Rezende Date: Fri, 17 Mar 2023 15:14:19 -0300 Subject: [PATCH 2/2] demo refactor: removes the use of setDataProvider method The method is deprecated and was removed in vaadin 24 --- .../addons/autoselectcombobox/ComboBoxValidation.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/autoselectcombobox-demo/src/main/java/org/vaadin/addons/autoselectcombobox/ComboBoxValidation.java b/autoselectcombobox-demo/src/main/java/org/vaadin/addons/autoselectcombobox/ComboBoxValidation.java index bc95f16..0b167a3 100644 --- a/autoselectcombobox-demo/src/main/java/org/vaadin/addons/autoselectcombobox/ComboBoxValidation.java +++ b/autoselectcombobox-demo/src/main/java/org/vaadin/addons/autoselectcombobox/ComboBoxValidation.java @@ -1,7 +1,6 @@ package org.vaadin.addons.autoselectcombobox; import com.vaadin.flow.component.combobox.ComboBox; -import com.vaadin.flow.component.grid.Grid; import com.vaadin.flow.component.html.Anchor; import com.vaadin.flow.data.binder.Binder; import com.vaadin.flow.data.binder.Validator; @@ -29,7 +28,7 @@ private void addComboValidation() { ComboBox comboBoxDefault = new ComboBox<>("People"); comboBoxDefault.setHelperText("Default behaviour"); - comboBoxDefault.setDataProvider(dataProvider); + comboBoxDefault.setItems(dataProvider); comboBoxDefault.setItemLabelGenerator(Person::toString); // begin-source-example @@ -37,7 +36,7 @@ private void addComboValidation() { ComboBox comboBoxWithEnhancer = new ComboBox<>("ComboBoxEnhancer"); comboBoxWithEnhancer.setHelperText("Auto select if 1 option. Allow custom values + run validation against options."); comboBoxWithEnhancer.setItemLabelGenerator(Person::toString); - comboBoxWithEnhancer.setDataProvider(dataProvider); + comboBoxWithEnhancer.setItems(dataProvider); new ComboBoxEnhancer<>(comboBoxWithEnhancer).enableAutoSelect(buildEmptyPerson(), (displayValue, emptyValue) -> { emptyValue.setFirstName(displayValue); @@ -46,7 +45,7 @@ private void addComboValidation() { AutoSelectComboBox asComboBoxMultiItems = new AutoSelectComboBox<>("Autoselect with 1 item"); asComboBoxMultiItems.setHelperText("Custom Web Component. Auto select if 1 option. Allow custom values + run validation against options."); - asComboBoxMultiItems.setDataProvider(dataProvider); + asComboBoxMultiItems.setItems(dataProvider); asComboBoxMultiItems.setItemLabelGenerator(Person::toString); asComboBoxMultiItems.setClearButtonVisible(true); asComboBoxMultiItems.addValueChangeListener(e -> {