From 37e09697298224f6b56917247bb39f3ce6c0fb1e Mon Sep 17 00:00:00 2001 From: Henri Sara Date: Mon, 9 Nov 2015 12:58:52 +0200 Subject: 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 --- server/src/main/java/com/vaadin/ui/ComboBox.java | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) (limited to 'server/src/main') 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 -- cgit v1.2.3