diff --git a/.settings/org.eclipse.wst.common.component b/.settings/org.eclipse.wst.common.component index 13a1538..af6a9f9 100644 --- a/.settings/org.eclipse.wst.common.component +++ b/.settings/org.eclipse.wst.common.component @@ -25,6 +25,9 @@ uses + + uses + uses diff --git a/pom.xml b/pom.xml index cc3227f..50df1d2 100644 --- a/pom.xml +++ b/pom.xml @@ -39,7 +39,7 @@ ${project.basedir}/distro ${project.build.directory}/${project.build.finalName} - 2013-10-18 + 2014-06-05 templates distro config @@ -277,6 +277,13 @@ [1.0.0-SNAPSHOT,2.0.0-SNAPSHOT) + + + org.gcube.portlets.user + tabular-data-codelistmapping-import-widget + [1.0.0-SNAPSHOT,2.0.0-SNAPSHOT) + + org.gcube.portlets.user 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 7998a3d..d7b7ffe 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 @@ -8,6 +8,7 @@ import java.util.ArrayList; import org.gcube.portlets.user.td.client.template.TemplateApplyDialog; import org.gcube.portlets.user.td.client.template.TemplateDeleteDialog; import org.gcube.portlets.user.td.client.template.TemplateOpenDialog; +import org.gcube.portlets.user.td.codelistmappingimportwidget.client.CodelistMappingImportWizardTD; import org.gcube.portlets.user.td.columnwidget.client.batch.ReplaceBatchDialog; import org.gcube.portlets.user.td.columnwidget.client.replace.ReplaceDialog; import org.gcube.portlets.user.td.csvexportwidget.client.CSVExportWizardTD; @@ -508,6 +509,9 @@ public class TabularDataController { case EXTRACTCODELIST: openExtractCodelistWizard(); break; + case CODELISTMAPPING: + openCodelistMappingWizard(); + break; case GENERATESUMMARY: break; case TABLEFILTER: @@ -773,6 +777,43 @@ public class TabularDataController { } + + protected void openCodelistMappingWizard() { + GWT.runAsync(new RunAsyncCallback() { + + public void onSuccess() { + openWizard(); + CodelistMappingImportWizardTD codelistMappingWizard = new CodelistMappingImportWizardTD( + trId,"Codelist Mapping Import", eventBus); + + codelistMappingWizard.addListener(new WizardListener() { + public void failed(Throwable throwable, String reason, + String details) { + UtilsGXT3.alert(reason, details); + resumeUIState(); + } + + public void completed(TRId id) { + openTable(id); + + } + + public void aborted() { + resumeUIState(); + } + }); + + codelistMappingWizard.show(); + } + + public void onFailure(Throwable reason) { + asyncCodeLoadingFailed(reason); + } + }); + + } + + /** * */ 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 cc2830f..0217c53 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 @@ -317,7 +317,7 @@ public class CurationToolBar { codelistMappingButton.addSelectHandler(new SelectHandler() { public void onSelect(SelectEvent event) { - eventBus.fireEvent(new RibbonEvent(RibbonType.EXTRACTCODELIST)); + eventBus.fireEvent(new RibbonEvent(RibbonType.CODELISTMAPPING)); } }); diff --git a/src/main/java/org/gcube/portlets/user/td/tabulardataportlet.gwt.xml b/src/main/java/org/gcube/portlets/user/td/tabulardataportlet.gwt.xml index ca030d5..19a12cf 100644 --- a/src/main/java/org/gcube/portlets/user/td/tabulardataportlet.gwt.xml +++ b/src/main/java/org/gcube/portlets/user/td/tabulardataportlet.gwt.xml @@ -38,14 +38,16 @@ name='org.gcube.portlets.user.td.csvexportwidget.CSVExportWizardTD' /> + - - + + 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 1a80de1..df6e30b 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 @@ -37,6 +37,9 @@ name='org.gcube.portlets.user.td.csvexportwidget.CSVExportWizardTD' /> + +