diff --git a/src/main/java/org/gcube/portlets/user/td/statisticalwidget/client/StatisticalWidget.java b/src/main/java/org/gcube/portlets/user/td/statisticalwidget/client/StatisticalWidget.java index c60151f..4b7809e 100644 --- a/src/main/java/org/gcube/portlets/user/td/statisticalwidget/client/StatisticalWidget.java +++ b/src/main/java/org/gcube/portlets/user/td/statisticalwidget/client/StatisticalWidget.java @@ -37,6 +37,7 @@ public class StatisticalWidget { protected EventBus eventBus; protected TRId trId; + protected StatisticalManagerExperimentsWidget statisticalManagerExperimentsWidget; /** @@ -123,20 +124,22 @@ public class StatisticalWidget { } - - - protected void openStatisticalWidget(){ ArrayList tables = new ArrayList(); TDExternalTable tdExternalTable=new TDExternalTable(trId, eventBus, id, label,columns); tables.add(tdExternalTable); - TDSubmissionHandler tdSubmissionHandler = new TDSubmissionHandler(trId, + TDSubmissionHandler tdSubmissionHandler = new TDSubmissionHandler(this, trId, eventBus); - @SuppressWarnings("unused") - StatisticalManagerExperimentsWidget st = new StatisticalManagerExperimentsWidget( + + statisticalManagerExperimentsWidget = new StatisticalManagerExperimentsWidget( null, tables, "ExecutionComputationDefault", tdSubmissionHandler); } + + + public void closeStatisticalWidget(){ + statisticalManagerExperimentsWidget.hide(); + } } diff --git a/src/main/java/org/gcube/portlets/user/td/statisticalwidget/client/stat/TDExternalTable.java b/src/main/java/org/gcube/portlets/user/td/statisticalwidget/client/stat/TDExternalTable.java index 17d2130..8eb51b4 100644 --- a/src/main/java/org/gcube/portlets/user/td/statisticalwidget/client/stat/TDExternalTable.java +++ b/src/main/java/org/gcube/portlets/user/td/statisticalwidget/client/stat/TDExternalTable.java @@ -43,7 +43,7 @@ public class TDExternalTable implements ExternalTable { @Override public String getId() { - return id; + return "TableId [value="+id+"]"; } @Override public String getLabel() { diff --git a/src/main/java/org/gcube/portlets/user/td/statisticalwidget/client/stat/TDSubmissionHandler.java b/src/main/java/org/gcube/portlets/user/td/statisticalwidget/client/stat/TDSubmissionHandler.java index aab48af..3741280 100644 --- a/src/main/java/org/gcube/portlets/user/td/statisticalwidget/client/stat/TDSubmissionHandler.java +++ b/src/main/java/org/gcube/portlets/user/td/statisticalwidget/client/stat/TDSubmissionHandler.java @@ -7,6 +7,7 @@ import org.gcube.portlets.user.td.gwtservice.shared.statistical.StatisticalOpera import org.gcube.portlets.user.td.monitorwidget.client.MonitorDialog; import org.gcube.portlets.user.td.monitorwidget.client.MonitorDialogListener; import org.gcube.portlets.user.td.monitorwidget.client.utils.UtilsGXT3; +import org.gcube.portlets.user.td.statisticalwidget.client.StatisticalWidget; import org.gcube.portlets.user.td.widgetcommonevent.client.event.ChangeTableRequestEvent; import org.gcube.portlets.user.td.widgetcommonevent.client.event.SessionExpiredEvent; import org.gcube.portlets.user.td.widgetcommonevent.client.type.ChangeTableRequestType; @@ -31,8 +32,10 @@ public class TDSubmissionHandler implements SubmissionHandler, protected EventBus eventBus; protected TRId trId; - - public TDSubmissionHandler(TRId trId, EventBus eventBus) { + protected StatisticalWidget statisticalWidget; + + public TDSubmissionHandler(StatisticalWidget statisticalWidget, TRId trId, EventBus eventBus) { + this.statisticalWidget=statisticalWidget; this.trId = trId; this.eventBus = eventBus; } @@ -45,7 +48,8 @@ public class TDSubmissionHandler implements SubmissionHandler, UtilsGXT3.alert("Error", "Invalid params null"); return; } - + statisticalWidget.closeStatisticalWidget(); + StatisticalOperationSession statisticalOperationSession = new StatisticalOperationSession( trId, params.getParametersMap(), params.getDescription(), params.getTitle(), params.getOp().getId(), params.getOp()