From 88f1a975e69edf3cb3ef69bc327a58871f6956c1 Mon Sep 17 00:00:00 2001 From: Giancarlo Panichi Date: Thu, 27 Nov 2014 11:51:31 +0000 Subject: [PATCH] Minor update git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-codelistmapping-import-widget@101727 82a268e6-3cf1-43bd-a215-b396298e98cf --- pom.xml | 14 +++++++-- .../client/TabResourcesSelectionCard.java | 29 +++++++++++++++++- .../client/TabResourcesSelectionPanel.java | 30 +++++++++++++++++-- 3 files changed, 68 insertions(+), 5 deletions(-) diff --git a/pom.xml b/pom.xml index 7782194..0464713 100644 --- a/pom.xml +++ b/pom.xml @@ -46,6 +46,14 @@ 2.5.1 + 3.2.1 + 3.0.1 + + + ${env.KEYS} @@ -77,10 +85,12 @@ com.google.gwt gwt-servlet + ${gwtVersion} com.google.gwt gwt-user + ${gwtVersion} @@ -106,7 +116,7 @@ com.sencha.gxt gxt - 3.0.1 + ${gxtVersion} @@ -166,7 +176,7 @@ com.allen-sauer.gwt.log gwt-log - 3.2.1 + ${gwtLogVersion} provided diff --git a/src/main/java/org/gcube/portlets/user/td/codelistmappingimportwidget/client/TabResourcesSelectionCard.java b/src/main/java/org/gcube/portlets/user/td/codelistmappingimportwidget/client/TabResourcesSelectionCard.java index 6b3283c..a49a2d6 100644 --- a/src/main/java/org/gcube/portlets/user/td/codelistmappingimportwidget/client/TabResourcesSelectionCard.java +++ b/src/main/java/org/gcube/portlets/user/td/codelistmappingimportwidget/client/TabResourcesSelectionCard.java @@ -17,6 +17,9 @@ import com.google.gwt.user.client.rpc.AsyncCallback; import com.sencha.gxt.widget.core.client.Dialog.PredefinedButton; import com.sencha.gxt.widget.core.client.box.AlertMessageBox; import com.sencha.gxt.widget.core.client.box.ConfirmMessageBox; +//Next in GXT 3.1.1 +//import com.sencha.gxt.widget.core.client.event.DialogHideEvent; +//import com.sencha.gxt.widget.core.client.event.DialogHideEvent.DialogHideHandler; import com.sencha.gxt.widget.core.client.event.HideEvent; import com.sencha.gxt.widget.core.client.event.HideEvent.HideHandler; @@ -133,7 +136,6 @@ public class TabResourcesSelectionCard extends WizardCard { if (mb.getHideButton() == mb.getButtonById(PredefinedButton.YES .name())) { callDeleteLastTable(); - } else if (mb.getHideButton() == mb .getButtonById(PredefinedButton.NO.name())) { getWizardWindow().setEnableNextButton(true); @@ -141,6 +143,31 @@ public class TabResourcesSelectionCard extends WizardCard { } } }); + + /* Next in GXT 3.1.1 + + mb.addDialogHideHandler(new DialogHideHandler() { + + + @Override + public void onDialogHide(DialogHideEvent event) { + switch (event.getHideButton()) { + case NO: + getWizardWindow().setEnableNextButton(true); + getWizardWindow().setEnableBackButton(true); + break; + case YES: + callDeleteLastTable(); + break; + default: + getWizardWindow().setEnableNextButton(true); + getWizardWindow().setEnableBackButton(true); + break; + + } + + } + });*/ mb.setWidth(300); mb.show(); diff --git a/src/main/java/org/gcube/portlets/user/td/codelistmappingimportwidget/client/TabResourcesSelectionPanel.java b/src/main/java/org/gcube/portlets/user/td/codelistmappingimportwidget/client/TabResourcesSelectionPanel.java index 3eb551e..7ac72fc 100644 --- a/src/main/java/org/gcube/portlets/user/td/codelistmappingimportwidget/client/TabResourcesSelectionPanel.java +++ b/src/main/java/org/gcube/portlets/user/td/codelistmappingimportwidget/client/TabResourcesSelectionPanel.java @@ -45,8 +45,11 @@ import com.sencha.gxt.widget.core.client.button.TextButton; import com.sencha.gxt.widget.core.client.container.VerticalLayoutContainer; import com.sencha.gxt.widget.core.client.container.VerticalLayoutContainer.VerticalLayoutData; import com.sencha.gxt.widget.core.client.event.HideEvent; -import com.sencha.gxt.widget.core.client.event.HideEvent.HideHandler; +//Next in GXT 3.1.1 +//import com.sencha.gxt.widget.core.client.event.DialogHideEvent; +//import com.sencha.gxt.widget.core.client.event.DialogHideEvent.DialogHideHandler; import com.sencha.gxt.widget.core.client.event.SelectEvent; +import com.sencha.gxt.widget.core.client.event.HideEvent.HideHandler; import com.sencha.gxt.widget.core.client.event.SelectEvent.SelectHandler; import com.sencha.gxt.widget.core.client.form.TextField; import com.sencha.gxt.widget.core.client.grid.CheckBoxSelectionModel; @@ -341,10 +344,33 @@ public class TabResourcesSelectionPanel extends ContentPanel implements callDeleteTabularResource(); } else if (mb.getHideButton() == mb .getButtonById(PredefinedButton.NO.name())) { - // perform NO action + } } }); + + /*Next in GXT 3.1.1 + * + mb.addDialogHideHandler(new DialogHideHandler() { + + @Override + public void onDialogHide(DialogHideEvent event) { + switch (event.getHideButton()) { + case NO: + break; + case YES: + callDeleteTabularResource(); + break; + default: + break; + + } + + } + }); + */ + + mb.setWidth(300); mb.show();