diff --git a/src/main/java/org/gcube/portlets/user/td/widgetcommonevent/client/event/ExpressionEvent.java b/src/main/java/org/gcube/portlets/user/td/widgetcommonevent/client/event/ExpressionEvent.java
deleted file mode 100644
index 7992516..0000000
--- a/src/main/java/org/gcube/portlets/user/td/widgetcommonevent/client/event/ExpressionEvent.java
+++ /dev/null
@@ -1,139 +0,0 @@
-package org.gcube.portlets.user.td.widgetcommonevent.client.event;
-
-import org.gcube.portlets.user.td.widgetcommonevent.client.type.ExpressionType;
-import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId;
-import org.gcube.portlets.user.td.widgetcommonevent.shared.expression.C_ExpressionContainer;
-
-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 ExpressionEvent extends GwtEvent {
-
- public static Type TYPE = new Type();
- private ExpressionType expressionType;
- private TRId trId;
- private String columnId;
- private String columnName;
- private C_ExpressionContainer c_ConditionExpressionContainer;
- private boolean replaceByValue;
- private String replaceValue;
- private C_ExpressionContainer c_ReplaceExpressionContainer;
-
- public interface ExpressionEventHandler extends EventHandler {
- void onExpression(ExpressionEvent event);
- }
-
- public interface HasExpressionEventHandler extends HasHandlers{
- public HandlerRegistration addExpressionEventHandler(ExpressionEventHandler handler);
- }
-
- public ExpressionEvent(ExpressionType expressionType) {
- this.expressionType = expressionType;
- }
-
- public ExpressionType getExpressionType() {
- return expressionType;
- }
-
- @Override
- protected void dispatch(ExpressionEventHandler handler) {
- handler.onExpression(this);
- }
-
- @Override
- public Type getAssociatedType() {
- return TYPE;
- }
-
- public static Type getType() {
- return TYPE;
- }
-
- public static void fire(HasHandlers source, ExpressionType expressionType) {
- source.fireEvent(new ExpressionEvent(expressionType));
- }
-
- public TRId getTrId() {
- return trId;
- }
-
- public void setTrId(TRId trId) {
- this.trId = trId;
- }
-
- public String getColumnName() {
- return columnName;
- }
-
- public void setColumnName(String columnName) {
- this.columnName = columnName;
- }
-
- public C_ExpressionContainer getC_ConditionExpressionContainer() {
- return c_ConditionExpressionContainer;
- }
-
- public void setC_ConditionExpressionContainer(C_ExpressionContainer c_ConditionExpressionContainer) {
- this.c_ConditionExpressionContainer = c_ConditionExpressionContainer;
- }
-
- public String getColumnId() {
- return columnId;
- }
-
- public void setColumnId(String columnId) {
- this.columnId = columnId;
- }
-
-
- public boolean isReplaceByValue() {
- return replaceByValue;
- }
-
- public void setReplaceByValue(boolean replaceByValue) {
- this.replaceByValue = replaceByValue;
- }
-
- public C_ExpressionContainer getC_ReplaceExpressionContainer() {
- return c_ReplaceExpressionContainer;
- }
-
- public void setC_ReplaceExpressionContainer(
- C_ExpressionContainer c_ReplaceExpressionContainer) {
- this.c_ReplaceExpressionContainer = c_ReplaceExpressionContainer;
- }
-
- public String getReplaceValue() {
- return replaceValue;
- }
-
- public void setReplaceValue(String replaceValue) {
- this.replaceValue = replaceValue;
- }
-
- @Override
- public String toString() {
- return "ExpressionEvent [expressionType=" + expressionType + ", trId="
- + trId + ", columnId=" + columnId + ", columnName="
- + columnName + ", c_ConditionExpressionContainer="
- + c_ConditionExpressionContainer + ", replaceByValue="
- + replaceByValue + ", replaceValue=" + replaceValue
- + ", c_ReplaceExpressionContainer="
- + c_ReplaceExpressionContainer + "]";
- }
-
-
-
-
-
-
-
-}
diff --git a/src/main/java/org/gcube/portlets/user/td/widgetcommonevent/client/event/ExpressionWrapperEvent.java b/src/main/java/org/gcube/portlets/user/td/widgetcommonevent/client/event/ExpressionWrapperEvent.java
new file mode 100644
index 0000000..4f78eac
--- /dev/null
+++ b/src/main/java/org/gcube/portlets/user/td/widgetcommonevent/client/event/ExpressionWrapperEvent.java
@@ -0,0 +1,81 @@
+package org.gcube.portlets.user.td.widgetcommonevent.client.event;
+
+import org.gcube.portlets.user.td.widgetcommonevent.shared.expression.ExpressionWrapper;
+
+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 ExpressionWrapperEvent extends GwtEvent {
+
+ public static Type TYPE = new Type();
+ private ExpressionWrapper expressionWrapper;
+
+
+ public interface ExpressionWrapperEventHandler extends EventHandler {
+ void onExpression(ExpressionWrapperEvent event);
+ }
+
+ public interface HasExpressionWrapperEventHandler extends HasHandlers{
+ public HandlerRegistration addExpressionWrapperEventHandler(ExpressionWrapperEventHandler handler);
+
+ public void removeExpressionWrapperEventHandler(ExpressionWrapperEventHandler handler);
+
+
+ }
+
+ public ExpressionWrapperEvent(ExpressionWrapper expressionWrapper) {
+ this.expressionWrapper = expressionWrapper;
+ }
+
+
+ @Override
+ protected void dispatch(ExpressionWrapperEventHandler handler) {
+ handler.onExpression(this);
+ }
+
+
+
+ @Override
+ public Type getAssociatedType() {
+ return TYPE;
+ }
+
+ public static Type getType() {
+ return TYPE;
+ }
+
+ public static void fire(HasHandlers source, ExpressionWrapper expressionWrapper) {
+ source.fireEvent(new ExpressionWrapperEvent(expressionWrapper));
+ }
+
+
+
+ public ExpressionWrapper getExpressionWrapper() {
+ return expressionWrapper;
+ }
+
+
+ public void setExpressionWrapper(ExpressionWrapper expressionWrapper) {
+ this.expressionWrapper = expressionWrapper;
+ }
+
+
+ @Override
+ public String toString() {
+ return "ExpressionWrapperEvent [expressionWrapper=" + expressionWrapper
+ + "]";
+ }
+
+
+
+
+
+}
diff --git a/src/main/java/org/gcube/portlets/user/td/widgetcommonevent/shared/expression/ExpressionWrapper.java b/src/main/java/org/gcube/portlets/user/td/widgetcommonevent/shared/expression/ExpressionWrapper.java
new file mode 100644
index 0000000..97e3ee4
--- /dev/null
+++ b/src/main/java/org/gcube/portlets/user/td/widgetcommonevent/shared/expression/ExpressionWrapper.java
@@ -0,0 +1,247 @@
+package org.gcube.portlets.user.td.widgetcommonevent.shared.expression;
+
+import java.io.Serializable;
+
+import org.gcube.portlets.user.td.widgetcommonevent.client.type.ExpressionType;
+import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId;
+
+/**
+ *
+ * @author "Giancarlo Panichi" g.panichi@isti.cnr.it
+ *
+ */
+public class ExpressionWrapper implements Serializable {
+
+ private static final long serialVersionUID = 3877772253100442685L;
+ private ExpressionType expressionType;
+ private TRId trId;
+ private String columnId;
+ private String columnName;
+ private C_ExpressionContainer conditionExpressionContainer;
+ private boolean replaceByValue;
+ private String replaceValue;
+ private C_ExpressionContainer replaceExpressionContainer;
+
+ /**
+ *
+ */
+ public ExpressionWrapper() {
+ super();
+ this.expressionType=ExpressionType.EXPRESSION_NULL;
+ }
+
+
+ /**
+ *
+ * @param trId
+ * @param columnId
+ * @param columnName
+ * @param conditionExpressionContainer
+ */
+ public ExpressionWrapper(TRId trId,
+ String columnId, String columnName,
+ C_ExpressionContainer conditionExpressionContainer) {
+ super();
+
+ this.expressionType = ExpressionType.CONDITION_COLUMN_EXPRESSION;
+ this.trId = trId;
+ this.columnId = columnId;
+ this.columnName = columnName;
+ this.conditionExpressionContainer = conditionExpressionContainer;
+ this.replaceByValue = false;
+ this.replaceValue = null;
+ this.replaceExpressionContainer = null;
+ }
+
+ /**
+ *
+ * @param replaceValue
+ * @param trId
+ * @param columnId
+ * @param columnName
+ */
+ public ExpressionWrapper(String replaceValue,TRId trId,
+ String columnId, String columnName) {
+ super();
+ this.expressionType = ExpressionType.REPLACE_COLUMN_EXPRESSION;
+ this.trId = trId;
+ this.columnId = columnId;
+ this.columnName = columnName;
+ this.conditionExpressionContainer = null;
+ this.replaceByValue = true;
+ this.replaceValue = replaceValue;
+ this.replaceExpressionContainer = null;
+ }
+
+ /**
+ *
+ * @param replaceExpressionContainer
+ * @param trId
+ * @param columnId
+ * @param columnName
+ */
+ public ExpressionWrapper(C_ExpressionContainer replaceExpressionContainer,TRId trId,
+ String columnId, String columnName) {
+ super();
+ this.expressionType = ExpressionType.REPLACE_COLUMN_EXPRESSION;
+ this.trId = trId;
+ this.columnId = columnId;
+ this.columnName = columnName;
+ this.conditionExpressionContainer = null;
+ this.replaceByValue = false;
+ this.replaceValue = null;
+ this.replaceExpressionContainer = replaceExpressionContainer;
+ }
+
+
+
+ /**
+ *
+ * @param trId
+ * @param columnId
+ * @param columnName
+ * @param conditionExpressionContainer
+ * @param replaceExpressionContainer
+ */
+ public ExpressionWrapper(TRId trId,
+ String columnId, String columnName,
+ C_ExpressionContainer conditionExpressionContainer,
+ C_ExpressionContainer replaceExpressionContainer) {
+ super();
+ this.expressionType = ExpressionType.CONDITION_AND_REPLACE_COLUMN_EXPRESSION;
+ this.trId = trId;
+ this.columnId = columnId;
+ this.columnName = columnName;
+ this.conditionExpressionContainer = conditionExpressionContainer;
+ this.replaceByValue = false;
+ this.replaceValue = null;
+ this.replaceExpressionContainer = replaceExpressionContainer;
+ }
+
+
+ /**
+ *
+ * @param trId
+ * @param columnId
+ * @param columnName
+ * @param conditionExpressionContainer
+ * @param replaceValue
+ */
+ public ExpressionWrapper(TRId trId,
+ String columnId, String columnName,
+ C_ExpressionContainer conditionExpressionContainer,
+ String replaceValue) {
+ super();
+ this.expressionType = ExpressionType.CONDITION_AND_REPLACE_COLUMN_EXPRESSION;
+ this.trId = trId;
+ this.columnId = columnId;
+ this.columnName = columnName;
+ this.conditionExpressionContainer = conditionExpressionContainer;
+ this.replaceByValue = true;
+ this.replaceValue = replaceValue;
+ this.replaceExpressionContainer = null;
+ }
+
+
+
+ public ExpressionType getExpressionType() {
+ return expressionType;
+ }
+
+
+ public void setExpressionType(ExpressionType expressionType) {
+ this.expressionType = expressionType;
+ }
+
+
+ public TRId getTrId() {
+ return trId;
+ }
+
+
+ public void setTrId(TRId trId) {
+ this.trId = trId;
+ }
+
+
+ public String getColumnId() {
+ return columnId;
+ }
+
+
+ public void setColumnId(String columnId) {
+ this.columnId = columnId;
+ }
+
+
+ public String getColumnName() {
+ return columnName;
+ }
+
+
+ public void setColumnName(String columnName) {
+ this.columnName = columnName;
+ }
+
+
+ public C_ExpressionContainer getConditionExpressionContainer() {
+ return conditionExpressionContainer;
+ }
+
+
+ public void setConditionExpressionContainer(
+ C_ExpressionContainer conditionExpressionContainer) {
+ this.conditionExpressionContainer = conditionExpressionContainer;
+ }
+
+
+ public boolean isReplaceByValue() {
+ return replaceByValue;
+ }
+
+
+ public void setReplaceByValue(boolean replaceByValue) {
+ this.replaceByValue = replaceByValue;
+ }
+
+
+ public String getReplaceValue() {
+ return replaceValue;
+ }
+
+
+ public void setReplaceValue(String replaceValue) {
+ this.replaceValue = replaceValue;
+ }
+
+
+ public C_ExpressionContainer getReplaceExpressionContainer() {
+ return replaceExpressionContainer;
+ }
+
+
+ public void setReplaceExpressionContainer(
+ C_ExpressionContainer replaceExpressionContainer) {
+ this.replaceExpressionContainer = replaceExpressionContainer;
+ }
+
+
+ @Override
+ public String toString() {
+ return "ExpressionWrapper [expressionType=" + expressionType
+ + ", trId=" + trId + ", columnId=" + columnId + ", columnName="
+ + columnName + ", conditionExpressionContainer="
+ + conditionExpressionContainer + ", replaceByValue="
+ + replaceByValue + ", replaceValue=" + replaceValue
+ + ", replaceExpressionContainer=" + replaceExpressionContainer
+ + "]";
+ }
+
+
+
+
+
+
+
+}