From 9d35813566e8f64b8ef80ad3ad764ed1eae807c4 Mon Sep 17 00:00:00 2001 From: Teemu Suo-Anttila Date: Thu, 15 Dec 2016 13:58:55 +0200 Subject: Redesign user-defined column identifiers for Grid (#7983) Closes vaadin/framework8-issues#494 --- .../com/vaadin/shared/ui/grid/ColumnState.java | 2 +- .../com/vaadin/shared/ui/grid/GridServerRpc.java | 31 +++++++++++----------- 2 files changed, 17 insertions(+), 16 deletions(-) (limited to 'shared') diff --git a/shared/src/main/java/com/vaadin/shared/ui/grid/ColumnState.java b/shared/src/main/java/com/vaadin/shared/ui/grid/ColumnState.java index 8d4429484b..6bf90afc03 100644 --- a/shared/src/main/java/com/vaadin/shared/ui/grid/ColumnState.java +++ b/shared/src/main/java/com/vaadin/shared/ui/grid/ColumnState.java @@ -20,7 +20,7 @@ import com.vaadin.shared.Connector; public class ColumnState extends AbstractGridExtensionState { public String caption; - public String id; + public String internalId; public boolean sortable; public boolean editable = false; diff --git a/shared/src/main/java/com/vaadin/shared/ui/grid/GridServerRpc.java b/shared/src/main/java/com/vaadin/shared/ui/grid/GridServerRpc.java index 08417b4b33..e1be703b41 100644 --- a/shared/src/main/java/com/vaadin/shared/ui/grid/GridServerRpc.java +++ b/shared/src/main/java/com/vaadin/shared/ui/grid/GridServerRpc.java @@ -23,7 +23,7 @@ import com.vaadin.shared.data.sort.SortDirection; import com.vaadin.shared.ui.grid.GridConstants.Section; /** - * Client-to-server RPC interface for the Grid component + * Client-to-server RPC interface for the Grid component. * * @since 7.4 * @author Vaadin Ltd @@ -38,12 +38,13 @@ public interface GridServerRpc extends ServerRpc { * * @param rowKey * a key identifying the clicked item - * @param columnId - * column id identifying the clicked property + * @param columnInternalId + * column internal id identifying the clicked property * @param details * mouse event details */ - void itemClick(String rowKey, String columnId, MouseEventDetails details); + void itemClick(String rowKey, String columnInternalId, + MouseEventDetails details); /** * Informs the server that a context click has happened inside of Grid. @@ -53,14 +54,14 @@ public interface GridServerRpc extends ServerRpc { * index of clicked row in Grid section * @param rowKey * a key identifying the clicked item - * @param columnId - * column id identifying the clicked property + * @param columnInternalId + * column internal id identifying the clicked property * @param section * grid section (header, footer, body) * @param details * mouse event details */ - void contextClick(int rowIndex, String rowKey, String columnId, + void contextClick(int rowIndex, String rowKey, String columnInternalId, Section section, MouseEventDetails details); /** @@ -68,9 +69,9 @@ public interface GridServerRpc extends ServerRpc { * * @since 7.5.0 * @param newColumnOrder - * a list of column ids in the new order + * a list of column internal ids in the new order * @param oldColumnOrder - * a list of column ids in order before the change + * a list of column internal ids in order before the change */ void columnsReordered(List newColumnOrder, List oldColumnOrder); @@ -79,21 +80,21 @@ public interface GridServerRpc extends ServerRpc { * Informs the server that a column's visibility has been changed. * * @since 7.5.0 - * @param id - * the id of the column + * @param columnInternalId + * the internal id of the column * @param hidden * true if hidden, false if unhidden */ - void columnVisibilityChanged(String id, boolean hidden); + void columnVisibilityChanged(String columnInternalId, boolean hidden); /** * Informs the server that a column has been resized by the user. * * @since 7.6 - * @param id - * the id of the column + * @param columnInternalId + * the internal id of the column * @param pixels * the new width of the column in pixels */ - void columnResized(String id, double pixels); + void columnResized(String columnInternalId, double pixels); } -- cgit v1.2.3