summaryrefslogtreecommitdiffstats
path: root/shared
diff options
context:
space:
mode:
authorTeemu Suo-Anttila <teemusa@vaadin.com>2015-01-09 14:55:13 +0200
committerVaadin Code Review <review@vaadin.com>2015-01-14 10:25:13 +0000
commit35372dc1d3ede9d2005ac8bda5d5a7e4f3aba98d (patch)
tree9a387eeef20e858d9d586c7c02141f6273277945 /shared
parentdcfebeb46143d8e9c21424c572c48d2217c80477 (diff)
downloadvaadin-framework-35372dc1d3ede9d2005ac8bda5d5a7e4f3aba98d.tar.gz
vaadin-framework-35372dc1d3ede9d2005ac8bda5d5a7e4f3aba98d.zip
Add ItemClickEvents to Grid (#15449)
Change-Id: I743f4de9fd11c5d81b11a3b8f2e0957293c5587c
Diffstat (limited to 'shared')
-rw-r--r--shared/src/com/vaadin/shared/ui/grid/GridConstants.java5
-rw-r--r--shared/src/com/vaadin/shared/ui/grid/GridServerRpc.java13
2 files changed, 18 insertions, 0 deletions
diff --git a/shared/src/com/vaadin/shared/ui/grid/GridConstants.java b/shared/src/com/vaadin/shared/ui/grid/GridConstants.java
index 994b109204..b36a162476 100644
--- a/shared/src/com/vaadin/shared/ui/grid/GridConstants.java
+++ b/shared/src/com/vaadin/shared/ui/grid/GridConstants.java
@@ -63,4 +63,9 @@ public final class GridConstants implements Serializable {
* Default width for columns.
*/
public static final double DEFAULT_COLUMN_WIDTH_PX = -1;
+
+ /**
+ * Event ID for item click events
+ */
+ public static final String ITEM_CLICK_EVENT_ID = "itemClick";
}
diff --git a/shared/src/com/vaadin/shared/ui/grid/GridServerRpc.java b/shared/src/com/vaadin/shared/ui/grid/GridServerRpc.java
index 77eda7a2f6..c90a016383 100644
--- a/shared/src/com/vaadin/shared/ui/grid/GridServerRpc.java
+++ b/shared/src/com/vaadin/shared/ui/grid/GridServerRpc.java
@@ -17,6 +17,7 @@ package com.vaadin.shared.ui.grid;
import java.util.List;
+import com.vaadin.shared.MouseEventDetails;
import com.vaadin.shared.communication.ServerRpc;
import com.vaadin.shared.data.sort.SortDirection;
@@ -34,4 +35,16 @@ public interface GridServerRpc extends ServerRpc {
void sort(String[] columnIds, SortDirection[] directions,
boolean userOriginated);
+
+ /**
+ * Informs the server that an item has been clicked in Grid.
+ *
+ * @param rowKey
+ * a key identifying the clicked item
+ * @param columnId
+ * column id identifying the clicked property
+ * @param details
+ * mouse event details
+ */
+ void itemClick(String rowKey, String columnId, MouseEventDetails details);
}