From 6c37ea0a19972e041b082200c4e47af65e6e3ad0 Mon Sep 17 00:00:00 2001 From: Giancarlo Panichi Date: Tue, 20 May 2014 16:54:56 +0000 Subject: [PATCH] Updated for curation on validations git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-portlet@95874 82a268e6-3cf1-43bd-a215-b396298e98cf --- .../user/td/client/TabularDataController.java | 53 ++++++++++++++++++- .../user/td/tabulardataportlet.gwt.xml | 8 +-- 2 files changed, 56 insertions(+), 5 deletions(-) diff --git a/src/main/java/org/gcube/portlets/user/td/client/TabularDataController.java b/src/main/java/org/gcube/portlets/user/td/client/TabularDataController.java index 562f492..ad907ab 100644 --- a/src/main/java/org/gcube/portlets/user/td/client/TabularDataController.java +++ b/src/main/java/org/gcube/portlets/user/td/client/TabularDataController.java @@ -41,6 +41,7 @@ import org.gcube.portlets.user.td.widgetcommonevent.client.type.WidgetRequestTyp import org.gcube.portlets.user.td.widgetcommonevent.shared.CellData; import org.gcube.portlets.user.td.widgetcommonevent.shared.GridHeaderOperationId; import org.gcube.portlets.user.td.widgetcommonevent.shared.GridOperationId; +import org.gcube.portlets.user.td.widgetcommonevent.shared.RequestProperties; import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId; import org.gcube.portlets.user.td.widgetcommonevent.shared.grid.model.RowRaw; import org.gcube.portlets.user.td.wizardwidget.client.WizardListener; @@ -244,6 +245,19 @@ public class TabularDataController { } }); + + eventBus.addHandler(WidgetRequestEvent.TYPE, + new WidgetRequestEvent.WidgetRequestEventHandler() { + + @Override + public void onWidgetRequest(WidgetRequestEvent event) { + Log.debug("Catch Event HeaderColumnMenuItemEvent"); + doWidgetRequestCommand(event); + + + } + + }); eventBus.fireEvent(new UIStateEvent(UIStateType.START)); @@ -573,7 +587,44 @@ public class TabularDataController { break; } } - + //TODO + protected void doWidgetRequestCommand(WidgetRequestEvent event){ + WidgetRequestType widgetRequestType=event.getWidgetRequestType(); + switch(widgetRequestType){ + case CHANGECOLUMNTYPEPANEL: + break; + case CHANGETABLETYPEPANEL: + break; + case CURATIONBYREPLACEBATCHDIALOG: + openBatchReplace(event.getTrId(),event.getRequestProperties()); + break; + case DELETECOLUMNPANEL: + break; + case DUPLICATESROWSPANEL: + break; + case LABELCOLUNPANEL: + break; + case VALIDATIONSTASKSPANEL: + break; + default: + break; + + } + } + + protected void openBatchReplace(TRId trId, RequestProperties requestProperties){ + Log.debug("Request Open Batch Replace Dialog: "+trId+" "+requestProperties); + if (trId != null) { + ReplaceBatchDialog dialog = new ReplaceBatchDialog(trId, + requestProperties, eventBus); + dialog.show(); + } else { + Log.error("TRId is null"); + UtilsGXT3.alert("Error", "No tabular resource present"); + } + } + + protected void openSDMXImportWizard() { GWT.runAsync(new RunAsyncCallback() { diff --git a/src/main/resources/org/gcube/portlets/user/td/tabulardataportlet.gwt.xml b/src/main/resources/org/gcube/portlets/user/td/tabulardataportlet.gwt.xml index 8fd820e..233af43 100644 --- a/src/main/resources/org/gcube/portlets/user/td/tabulardataportlet.gwt.xml +++ b/src/main/resources/org/gcube/portlets/user/td/tabulardataportlet.gwt.xml @@ -45,17 +45,17 @@ - - + +