diff options
author | Henri Sara <hesara@vaadin.com> | 2015-11-09 12:58:52 +0200 |
---|---|---|
committer | Artur Signell <artur@vaadin.com> | 2016-08-08 09:45:12 +0000 |
commit | 37e09697298224f6b56917247bb39f3ce6c0fb1e (patch) | |
tree | e62f966eb0b4d917adadd9f529e3beebc6f7186c /server | |
parent | 6d493408ed7a53c42e57cd87b43548403ea5e3b7 (diff) | |
download | vaadin-framework-37e09697298224f6b56917247bb39f3ce6c0fb1e.tar.gz vaadin-framework-37e09697298224f6b56917247bb39f3ce6c0fb1e.zip |
Request ComboBox pages with RPC (#19929)
All client to server communication of ComboBox is now done
with RPC.
There is still an empty changeVariables() methods to
override the default behavior in AbstractSelect.
Change-Id: I718eeabd5c116ec4e00485ed37a0a6d5389ee1f0
Diffstat (limited to 'server')
-rw-r--r-- | server/src/main/java/com/vaadin/ui/ComboBox.java | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/server/src/main/java/com/vaadin/ui/ComboBox.java b/server/src/main/java/com/vaadin/ui/ComboBox.java index 73786b390c..2e58befaa5 100644 --- a/server/src/main/java/com/vaadin/ui/ComboBox.java +++ b/server/src/main/java/com/vaadin/ui/ComboBox.java @@ -103,6 +103,19 @@ public class ComboBox extends AbstractSelect implements } } } + + @Override + public void requestPage(String filter, int page) { + filterstring = filter; + if (filterstring != null) { + filterstring = filterstring.toLowerCase(getLocale()); + } + currentPage = page; + + // TODO this should trigger a data-only update instead of a full + // repaint + requestRepaint(); + } }; FocusAndBlurServerRpcImpl focusBlurRpc = new FocusAndBlurServerRpcImpl(this) { @@ -732,16 +745,7 @@ public class ComboBox extends AbstractSelect implements // Not calling super.changeVariables due the history of select // component hierarchy - String newFilter; - if ((newFilter = (String) variables.get("filter")) != null) { - // this is a filter request - currentPage = ((Integer) variables.get("page")).intValue(); - filterstring = newFilter; - if (filterstring != null) { - filterstring = filterstring.toLowerCase(getLocale()); - } - requestRepaint(); - } + // all the client to server requests are now handled by RPC } @Override |