From bb1eb2132bd0fd2d3d0fa46375d167d6064e23e7 Mon Sep 17 00:00:00 2001 From: Giancarlo Panichi Date: Wed, 14 May 2014 15:08:53 +0000 Subject: [PATCH] Added RowRaw git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-widget-common-event@95685 82a268e6-3cf1-43bd-a215-b396298e98cf --- .../event/GridContextMenuItemEvent.java | 28 ++++++++-- .../shared/grid/model/RowRaw.java | 56 +++++++++++++++++++ 2 files changed, 80 insertions(+), 4 deletions(-) create mode 100644 src/main/java/org/gcube/portlets/user/td/widgetcommonevent/shared/grid/model/RowRaw.java diff --git a/src/main/java/org/gcube/portlets/user/td/widgetcommonevent/client/event/GridContextMenuItemEvent.java b/src/main/java/org/gcube/portlets/user/td/widgetcommonevent/client/event/GridContextMenuItemEvent.java index 9430d98..b1a42f6 100644 --- a/src/main/java/org/gcube/portlets/user/td/widgetcommonevent/client/event/GridContextMenuItemEvent.java +++ b/src/main/java/org/gcube/portlets/user/td/widgetcommonevent/client/event/GridContextMenuItemEvent.java @@ -5,6 +5,7 @@ import java.util.ArrayList; import org.gcube.portlets.user.td.widgetcommonevent.shared.CellData; import org.gcube.portlets.user.td.widgetcommonevent.shared.GridOperationId; +import org.gcube.portlets.user.td.widgetcommonevent.shared.grid.model.RowRaw; import com.google.gwt.event.shared.EventHandler; import com.google.gwt.event.shared.GwtEvent; @@ -23,6 +24,7 @@ public class GridContextMenuItemEvent extends GwtEvent TYPE = new Type(); private GridOperationId gridOperationId; private ArrayList rows; + private RowRaw rowRaw; private CellData cellData; public interface GridContextMenuItemEventHandler extends EventHandler { @@ -34,8 +36,8 @@ public class GridContextMenuItemEvent extends GwtEvent rows) { - source.fireEvent(new GridContextMenuItemEvent(gridOperationId,rows)); + public static void fire(HasHandlers source, GridContextMenuItemEvent gridContextMenuItemEvent) { + source.fireEvent(gridContextMenuItemEvent); } public GridContextMenuItemEvent(GridOperationId gridOperationId,ArrayList rows) { @@ -47,7 +49,11 @@ public class GridContextMenuItemEvent extends GwtEvent getType() { return TYPE; @@ -91,14 +97,28 @@ public class GridContextMenuItemEvent extends GwtEventg.panichi@isti.cnr.it + * + */ +public class RowRaw implements Serializable { + + private static final long serialVersionUID = -1603145847134978854L; + + protected Map rowRaw; + protected String rowId; + + public RowRaw() { + + } + + /** + * + * @param rowId row identify + * @param rowRaw A map from columnLocalId to value as String + */ + public RowRaw(String rowId, Map rowRaw) { + this.rowId = rowId; + this.rowRaw = rowRaw; + } + + public Map getRowRaw() { + return rowRaw; + } + + public void setRowRaw(Map rowRaw) { + this.rowRaw = rowRaw; + } + + public String getRowId() { + return rowId; + } + + public void setRowId(String rowId) { + this.rowId = rowId; + } + + @Override + public String toString() { + return "RowRaw [rowId=" + rowId + ", rowRaw=" + rowRaw + "]"; + } + +}