summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorMatti Tahvonen <matti@vaadin.com>2015-05-29 16:22:26 +0300
committerVaadin Code Review <review@vaadin.com>2015-06-08 07:19:26 +0000
commit5ae33b641eea02b647825b27c311d4116f3be838 (patch)
treecc731c84e62a14b7a3a621841cb7590ee3081f04 /client
parentb0d5315e8ba95d099f93dc2d16339033a6525b59 (diff)
downloadvaadin-framework-5ae33b641eea02b647825b27c311d4116f3be838.tar.gz
vaadin-framework-5ae33b641eea02b647825b27c311d4116f3be838.zip
Selection is now shown although scrollToSelectedItem is false (#16673)
If scrollToSelectedItem is set to false (which is needed to work properly with large datasets) the selected item caption is sent to client with a special attribute to avoid the field looking like unselected. Change-Id: Ib80355c3b52faaaeaa9ab7195644701cc3bf0d15
Diffstat (limited to 'client')
-rw-r--r--client/src/com/vaadin/client/ui/combobox/ComboBoxConnector.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/client/src/com/vaadin/client/ui/combobox/ComboBoxConnector.java b/client/src/com/vaadin/client/ui/combobox/ComboBoxConnector.java
index 8757f46e71..1224a2eaf2 100644
--- a/client/src/com/vaadin/client/ui/combobox/ComboBoxConnector.java
+++ b/client/src/com/vaadin/client/ui/combobox/ComboBoxConnector.java
@@ -173,6 +173,12 @@ public class ComboBoxConnector extends AbstractFieldConnector implements
// started.
if (selectedKeys.length > 0 && !selectedKeys[0].equals("")) {
performSelection(selectedKeys[0]);
+ } else if (!getWidget().waitingForFilteringResponse
+ && uidl.hasAttribute("selectedCaption")) {
+ // scrolling to correct page is disabled, caption is passed as a
+ // special parameter
+ getWidget().tb.setText(uidl
+ .getStringAttribute("selectedCaption"));
} else {
resetSelection();
}