From 5ae33b641eea02b647825b27c311d4116f3be838 Mon Sep 17 00:00:00 2001 From: Matti Tahvonen Date: Fri, 29 May 2015 16:22:26 +0300 Subject: 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 --- client/src/com/vaadin/client/ui/combobox/ComboBoxConnector.java | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'client') 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(); } -- cgit v1.2.3