aboutsummaryrefslogtreecommitdiffstats
path: root/server/src/main/java
diff options
context:
space:
mode:
authorHenri Sara <hesara@vaadin.com>2016-09-13 13:29:00 +0300
committerHenri Sara <hesara@vaadin.com>2016-09-14 14:12:28 +0300
commit4aac5294bba6eff216cddaa826b7739494376ff7 (patch)
treeb72849b9c6085a0fe914031ff22ea7f368269d8f /server/src/main/java
parent17f6c77a03130c715843ec2324eb03ffc104e079 (diff)
downloadvaadin-framework-4aac5294bba6eff216cddaa826b7739494376ff7.tar.gz
vaadin-framework-4aac5294bba6eff216cddaa826b7739494376ff7.zip
Use state for ComboBox selection
Change-Id: I612376b4030a750c987ba2d8016a4dc44bc02d41
Diffstat (limited to 'server/src/main/java')
-rw-r--r--server/src/main/java/com/vaadin/ui/ComboBox.java15
1 files changed, 1 insertions, 14 deletions
diff --git a/server/src/main/java/com/vaadin/ui/ComboBox.java b/server/src/main/java/com/vaadin/ui/ComboBox.java
index 39c2bad8ba..8fdc8452ed 100644
--- a/server/src/main/java/com/vaadin/ui/ComboBox.java
+++ b/server/src/main/java/com/vaadin/ui/ComboBox.java
@@ -38,7 +38,6 @@ import com.vaadin.server.data.DataKeyMapper;
import com.vaadin.server.data.DataSource;
import com.vaadin.shared.Registration;
import com.vaadin.shared.data.DataCommunicatorConstants;
-import com.vaadin.shared.ui.combobox.ComboBoxClientRpc;
import com.vaadin.shared.ui.combobox.ComboBoxConstants;
import com.vaadin.shared.ui.combobox.ComboBoxServerRpc;
import com.vaadin.shared.ui.combobox.ComboBoxState;
@@ -70,9 +69,7 @@ public class ComboBox<T> extends AbstractSingleSelect<T> implements HasValue<T>,
if (value != null) {
selectedCaption = getItemCaptionProvider().apply(value);
}
- // FIXME now overlap between state and RPC
- getRpcProxy(ComboBoxClientRpc.class).setSelectedItem(key,
- selectedCaption);
+ getState().selectedItemCaption = selectedCaption;
}
}
@@ -151,16 +148,6 @@ public class ComboBox<T> extends AbstractSingleSelect<T> implements HasValue<T>,
}
@Override
- public void setSelectedItem(String key) {
- // it seems both of these happen, and mean empty selection...
- if (key == null || "".equals(key)) {
- getSelectionModel().setSelectedFromClient(null);
- } else {
- getSelectionModel().setSelectedFromClient(key);
- }
- }
-
- @Override
public void setFilter(String filterText) {
filterstring = filterText;
if (filterText != null) {