From 7d2cb6ab31921b7a5e165f3c7b73e8b9bba08cb4 Mon Sep 17 00:00:00 2001 From: Giancarlo Panichi Date: Thu, 3 Jul 2014 16:15:45 +0000 Subject: [PATCH] Updated Denormalize git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-portlet@98402 82a268e6-3cf1-43bd-a215-b396298e98cf --- .../user/td/client/TabularDataController.java | 21 ++++++++++++++++++- .../td/client/ribbon/CurationToolBar.java | 2 +- .../user/td/tabulardataportlet.gwt.xml | 2 +- 3 files changed, 22 insertions(+), 3 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 4d5f86e..46c5718 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 @@ -509,6 +509,7 @@ public class TabularDataController { openColumnMerge(); break; case DENORMALIZE: + openDenormalize(); break; case NORMALIZE: openNormalize(); @@ -1014,7 +1015,25 @@ public class TabularDataController { Log.debug("Request Open Normalize Tab"); if (trId != null) { WidgetRequestEvent e = new WidgetRequestEvent( - WidgetRequestType.NORAMLIZEPANEL); + WidgetRequestType.NORMALIZEPANEL); + e.setTrId(trId); + e.setColumnName(columnName); + eventBus.fireEvent(e); + } else { + Log.error("TRId is null"); + UtilsGXT3.alert("Error", "No current tabular resource present"); + } + } + + protected void openDenormalize() { + openDenormalize(null); + } + + protected void openDenormalize(String columnName) { + Log.debug("Request Open Denormalize Tab"); + if (trId != null) { + WidgetRequestEvent e = new WidgetRequestEvent( + WidgetRequestType.DENORMALIZEPANEL); e.setTrId(trId); e.setColumnName(columnName); eventBus.fireEvent(e); diff --git a/src/main/java/org/gcube/portlets/user/td/client/ribbon/CurationToolBar.java b/src/main/java/org/gcube/portlets/user/td/client/ribbon/CurationToolBar.java index ab28280..bc249fc 100644 --- a/src/main/java/org/gcube/portlets/user/td/client/ribbon/CurationToolBar.java +++ b/src/main/java/org/gcube/portlets/user/td/client/ribbon/CurationToolBar.java @@ -453,7 +453,7 @@ public class CurationToolBar { rulesButton.disable(); manageRulesButton.disable(); applyTemplateButton.enable(); - denormalizeButton.disable(); + denormalizeButton.enable(); normalizeButton.enable(); changeColumnLabelButton.enable(); columnTypeButton.enable(); 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 826b5c3..133b47d 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 @@ -59,7 +59,7 @@ value="ENABLED" /> --> - +