From 1f94f03f56182697fda5c79ff42c492f26a8767b Mon Sep 17 00:00:00 2001 From: Henrik Paul Date: Mon, 30 Jun 2014 17:37:51 +0300 Subject: Client now recognizes server-side selection model changes. (#13334) Change-Id: Ic42e0e96871620fde6b9ce17dd5b487b1d6b8370 --- client/src/com/vaadin/client/ui/grid/GridConnector.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'client') diff --git a/client/src/com/vaadin/client/ui/grid/GridConnector.java b/client/src/com/vaadin/client/ui/grid/GridConnector.java index 59b8c4047c..ee1cc0ee75 100644 --- a/client/src/com/vaadin/client/ui/grid/GridConnector.java +++ b/client/src/com/vaadin/client/ui/grid/GridConnector.java @@ -25,10 +25,12 @@ import java.util.LinkedHashSet; import java.util.List; import java.util.Map; import java.util.Set; +import java.util.logging.Logger; import com.google.gwt.json.client.JSONArray; import com.google.gwt.json.client.JSONObject; import com.google.gwt.json.client.JSONValue; +import com.vaadin.client.annotations.OnStateChange; import com.vaadin.client.communication.StateChangeEvent; import com.vaadin.client.data.RpcDataSourceConnector.RpcDataSource; import com.vaadin.client.ui.AbstractComponentConnector; @@ -43,6 +45,7 @@ import com.vaadin.shared.ui.grid.GridClientRpc; import com.vaadin.shared.ui.grid.GridColumnState; import com.vaadin.shared.ui.grid.GridServerRpc; import com.vaadin.shared.ui.grid.GridState; +import com.vaadin.shared.ui.grid.GridState.SharedSelectionMode; import com.vaadin.shared.ui.grid.ScrollDestination; /** @@ -444,4 +447,18 @@ public class GridConnector extends AbstractComponentConnector { this.dataSource = dataSource; getWidget().setDataSource(this.dataSource); } + + @OnStateChange("selectionMode") + private void onSelectionModeChange() { + SharedSelectionMode mode = getState().selectionMode; + if (mode == null) { + getLogger().warning("ignored mode change"); + return; + } + getLogger().warning(mode.toString()); + } + + private Logger getLogger() { + return Logger.getLogger(getClass().getName()); + } } -- cgit v1.2.3