diff --git a/src/main/java/org/gcube/portlets/user/td/widgetcommonevent/client/event/DataViewActiveEvent.java b/src/main/java/org/gcube/portlets/user/td/widgetcommonevent/client/event/DataViewActiveEvent.java
new file mode 100644
index 0000000..ce61b13
--- /dev/null
+++ b/src/main/java/org/gcube/portlets/user/td/widgetcommonevent/client/event/DataViewActiveEvent.java
@@ -0,0 +1,63 @@
+package org.gcube.portlets.user.td.widgetcommonevent.client.event;
+
+
+
+import org.gcube.portlets.user.td.widgetcommonevent.shared.dataview.DataView;
+
+import com.google.gwt.event.shared.EventHandler;
+import com.google.gwt.event.shared.GwtEvent;
+import com.google.gwt.event.shared.HandlerRegistration;
+import com.google.gwt.event.shared.HasHandlers;
+
+/**
+ *
+ * @author "Giancarlo Panichi" g.panichi@isti.cnr.it
+ *
+ */
+public class DataViewActiveEvent extends
+ GwtEvent {
+
+ public static Type TYPE = new Type();
+ private DataView dataView;
+
+
+ public interface DataViewActiveEventHandler extends EventHandler {
+ void onDataViewActive(DataViewActiveEvent event);
+ }
+
+ public interface HasDataViewActiveEventHandler extends HasHandlers {
+ public HandlerRegistration addDataViewActiveEventHandler(
+ DataViewActiveEventHandler handler);
+ }
+
+ public DataViewActiveEvent(DataView dataView) {
+ this.dataView=dataView;
+ }
+
+ @Override
+ protected void dispatch(DataViewActiveEventHandler handler) {
+ handler.onDataViewActive(this);
+ }
+
+ @Override
+ public Type getAssociatedType() {
+ return TYPE;
+ }
+
+ public static Type getType() {
+ return TYPE;
+ }
+
+ public static void fire(HasHandlers source,
+ DataView dataView) {
+ source.fireEvent(new DataViewActiveEvent(dataView));
+ }
+
+ public DataView getDataView() {
+ return dataView;
+ }
+
+
+
+}
diff --git a/src/main/java/org/gcube/portlets/user/td/widgetcommonevent/client/event/DataViewRequestEvent.java b/src/main/java/org/gcube/portlets/user/td/widgetcommonevent/client/event/DataViewRequestEvent.java
index 0e3ee89..74faaab 100644
--- a/src/main/java/org/gcube/portlets/user/td/widgetcommonevent/client/event/DataViewRequestEvent.java
+++ b/src/main/java/org/gcube/portlets/user/td/widgetcommonevent/client/event/DataViewRequestEvent.java
@@ -1,7 +1,7 @@
package org.gcube.portlets.user.td.widgetcommonevent.client.event;
-import org.gcube.portlets.user.td.widgetcommonevent.client.type.DataViewRequestType;
+
import org.gcube.portlets.user.td.widgetcommonevent.shared.dataview.DataView;
import com.google.gwt.event.shared.EventHandler;
@@ -19,7 +19,6 @@ public class DataViewRequestEvent extends
GwtEvent {
public static Type TYPE = new Type();
- private DataViewRequestType dataViewRequestType;
private DataView dataView;
@@ -32,12 +31,8 @@ public class DataViewRequestEvent extends
DataViewRequestEventHandler handler);
}
- public DataViewRequestEvent(DataViewRequestType dataViewRequestType) {
- this.dataViewRequestType = dataViewRequestType;
- }
-
- public DataViewRequestType getDataViewRequestType() {
- return dataViewRequestType;
+ public DataViewRequestEvent(DataView dataView) {
+ this.dataView = dataView;
}
@Override
@@ -55,8 +50,8 @@ public class DataViewRequestEvent extends
}
public static void fire(HasHandlers source,
- DataViewRequestType dataViewRequestType) {
- source.fireEvent(new DataViewRequestEvent(dataViewRequestType));
+ DataView dataView) {
+ source.fireEvent(new DataViewRequestEvent(dataView));
}
public DataView getDataView() {
diff --git a/src/main/java/org/gcube/portlets/user/td/widgetcommonevent/client/type/DataViewRequestType.java b/src/main/java/org/gcube/portlets/user/td/widgetcommonevent/client/type/DataViewRequestType.java
deleted file mode 100644
index 52e11e4..0000000
--- a/src/main/java/org/gcube/portlets/user/td/widgetcommonevent/client/type/DataViewRequestType.java
+++ /dev/null
@@ -1,16 +0,0 @@
-/**
- *
- */
-package org.gcube.portlets.user.td.widgetcommonevent.client.type;
-
-/**
- *
- * @author "Giancarlo Panichi"
- * g.panichi@isti.cnr.it
- *
- */
-public enum DataViewRequestType {
- TABULARRESOURCE,
- RESOURCE;
-
-}