summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorHenri Sara <hesara@vaadin.com>2015-11-06 10:54:10 +0200
committerArtur Signell <artur@vaadin.com>2016-08-08 09:44:24 +0000
commit06e0a6567b473fab0d1b3090eaa5a589613f8ae2 (patch)
treee28a770640dc60fa15cee8f141a29ea29ca944bd /client
parent07292fe8fb7b9d9cf94dd3a57cfab4e6e31bd639 (diff)
downloadvaadin-framework-06e0a6567b473fab0d1b3090eaa5a589613f8ae2.tar.gz
vaadin-framework-06e0a6567b473fab0d1b3090eaa5a589613f8ae2.zip
Send ComboBox selection with RPC (#19929)
Send the selection from the client to the server with RPC. Change-Id: I67e4e526f59550e83d9400729adf91e2b4bbb806
Diffstat (limited to 'client')
-rw-r--r--client/src/main/java/com/vaadin/client/ui/VFilterSelect.java4
-rw-r--r--client/src/main/java/com/vaadin/client/ui/combobox/ComboBoxConnector.java10
2 files changed, 6 insertions, 8 deletions
diff --git a/client/src/main/java/com/vaadin/client/ui/VFilterSelect.java b/client/src/main/java/com/vaadin/client/ui/VFilterSelect.java
index 677e6f846e..066c70fbcf 100644
--- a/client/src/main/java/com/vaadin/client/ui/VFilterSelect.java
+++ b/client/src/main/java/com/vaadin/client/ui/VFilterSelect.java
@@ -1858,7 +1858,7 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler,
if (!(newKey.equals(selectedOptionKey) || ("".equals(newKey) && selectedOptionKey == null))) {
selectedOptionKey = newKey;
- connector.sendSelection(new String[] { selectedOptionKey });
+ connector.sendSelection(selectedOptionKey);
afterUpdateClientVariables();
// currentPage = -1; // forget the page
@@ -1870,7 +1870,7 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler,
// hard to interpret that new clause added here :-(
selectedOptionKey = newKey;
explicitSelectedCaption = null;
- connector.sendSelection(new String[] { selectedOptionKey });
+ connector.sendSelection(selectedOptionKey);
afterUpdateClientVariables();
}
diff --git a/client/src/main/java/com/vaadin/client/ui/combobox/ComboBoxConnector.java b/client/src/main/java/com/vaadin/client/ui/combobox/ComboBoxConnector.java
index c4a9856311..2b02b0dfca 100644
--- a/client/src/main/java/com/vaadin/client/ui/combobox/ComboBoxConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/combobox/ComboBoxConnector.java
@@ -417,10 +417,9 @@ public class ComboBoxConnector extends AbstractFieldConnector implements
* @since
*/
public void requestFirstPage() {
+ sendSelection(null);
getConnection().updateVariable(getConnectorId(), "filter", "", false);
- getConnection().updateVariable(getConnectorId(), "page", 0, false);
- getConnection().updateVariable(getConnectorId(), "selected",
- new String[] {}, immediate);
+ getConnection().updateVariable(getConnectorId(), "page", 0, true);
}
/**
@@ -453,9 +452,8 @@ public class ComboBoxConnector extends AbstractFieldConnector implements
* @param selection
* the current selection
*/
- public void sendSelection(String[] selection) {
- getConnection().updateVariable(getConnectorId(), "selected", selection,
- immediate);
+ public void sendSelection(String selection) {
+ rpc.setSelectedItem(selection);
}
/**