diff --git a/.classpath b/.classpath
index 34ab439..a5352c8 100644
--- a/.classpath
+++ b/.classpath
@@ -1,12 +1,12 @@
-
+
-
+
@@ -33,5 +33,5 @@
-
+
diff --git a/config/profile.xml b/config/profile.xml
index d5b68d6..556903f 100644
--- a/config/profile.xml
+++ b/config/profile.xml
@@ -6,20 +6,20 @@
tabular-data-json-export-widget allows json export inside file and workspace
PortletsUser
tabular-data-json-export-widget
- 1.2.0-SNAPSHOT
+ 1.3.0-SNAPSHOT
tabular-data-json-export-widget allows json export inside file and workspace
tabular-data-json-export-widget
- 1.2.0-SNAPSHOT
+ 1.3.0-SNAPSHOT
org.gcube.portlets.user
tabular-data-json-export-widget
- 1.2.0-SNAPSHOT
+ 1.3.0-SNAPSHOT
library
- tabular-data-json-export-widget-1.2.0-SNAPSHOT.jar
+ tabular-data-json-export-widget-1.3.0-SNAPSHOT.jar
diff --git a/distro/README b/distro/README
index 8565728..0a62f6c 100644
--- a/distro/README
+++ b/distro/README
@@ -13,7 +13,7 @@ Istituto di Scienza e Tecnologie dell'Informazione "A. Faedo"
Version and Release Date
------------------------
-v. 1.2.0-SNAPSHOT (2015-04-30)
+v. 1.3.0-SNAPSHOT (2015-07-03)
Description
diff --git a/distro/changelog.xml b/distro/changelog.xml
index 707c49d..58b8542 100644
--- a/distro/changelog.xml
+++ b/distro/changelog.xml
@@ -1,4 +1,8 @@
+
+ Fixed Layout
+ Updated dependencies
+
Updated dependency
diff --git a/pom.xml b/pom.xml
index 9b99d79..d3a61a1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -13,7 +13,7 @@
4.0.0
org.gcube.portlets.user
tabular-data-json-export-widget
- 1.2.0-SNAPSHOT
+ 1.3.0-SNAPSHOT
tabular-data-json-export-widget
tabular-data-json-export-widget allows json export inside file and workspace
@@ -37,7 +37,7 @@
${project.basedir}/distro
${project.build.directory}/${project.build.finalName}
- 2015-04-30
+ 2015-07-03
https://gcube.wiki.gcube-system.org/gcube/index.php/Tabular_Data_Manager
templates
distro
@@ -89,21 +89,7 @@
${gwtVersion}
-
-
- javax.validation
- validation-api
- 1.0.0.GA
- test
-
-
- javax.validation
- validation-api
- 1.0.0.GA
- sources
- test
-
-
+
com.sencha.gxt
gxt
@@ -154,7 +140,6 @@
org.gcube.common
home-library
- [1.0.0-SNAPSHOT, 2.0.0-SNAPSHOT)
provided
diff --git a/src/main/java/org/gcube/portlets/user/td/jsonexportwidget/client/JSONExportConfigCard.java b/src/main/java/org/gcube/portlets/user/td/jsonexportwidget/client/JSONExportConfigCard.java
index e3cbd74..f88efbe 100644
--- a/src/main/java/org/gcube/portlets/user/td/jsonexportwidget/client/JSONExportConfigCard.java
+++ b/src/main/java/org/gcube/portlets/user/td/jsonexportwidget/client/JSONExportConfigCard.java
@@ -2,8 +2,15 @@ package org.gcube.portlets.user.td.jsonexportwidget.client;
import java.util.ArrayList;
+import org.gcube.portlets.user.td.gwtservice.client.rpc.TDGWTServiceAsync;
+import org.gcube.portlets.user.td.gwtservice.shared.destination.WorkspaceDestination;
+import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTIsLockedException;
+import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTSessionExpiredException;
import org.gcube.portlets.user.td.gwtservice.shared.json.JSONExportSession;
+import org.gcube.portlets.user.td.gwtservice.shared.tr.TabResource;
import org.gcube.portlets.user.td.jsonexportwidget.client.grid.ColumnDataGridPanel;
+import org.gcube.portlets.user.td.widgetcommonevent.client.event.SessionExpiredEvent;
+import org.gcube.portlets.user.td.widgetcommonevent.client.type.SessionExpiredType;
import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnData;
import org.gcube.portlets.user.td.wizardwidget.client.WizardCard;
@@ -11,6 +18,7 @@ import com.allen_sauer.gwt.log.client.Log;
import com.google.gwt.event.logical.shared.SelectionEvent;
import com.google.gwt.event.logical.shared.SelectionHandler;
import com.google.gwt.user.client.Command;
+import com.google.gwt.user.client.rpc.AsyncCallback;
import com.google.gwt.user.client.ui.HorizontalPanel;
import com.sencha.gxt.core.client.util.Padding;
import com.sencha.gxt.core.client.util.ToggleGroup;
@@ -154,17 +162,72 @@ public class JSONExportConfigCard extends WizardCard {
} else {
exportSession.setColumns(columns);
exportSession.setExportViewColumns(getExportViewColumns());
- goNext();
+ useWorkspaceDestination();
}
}
+
+ protected void useWorkspaceDestination(){
+ final WorkspaceDestination workspaceDestination = WorkspaceDestination.INSTANCE;
+ exportSession.setDestination(workspaceDestination);
+ retrieveTabularResource();
+ }
+
+ protected void retrieveTabularResource() {
+ TDGWTServiceAsync.INSTANCE
+ .getTabResourceInformation(new AsyncCallback() {
+ public void onSuccess(TabResource result) {
+ Log.info("Retrived TR: " + result.getTrId());
+ exportSession.setTabResource(result);
+ goNext();
+ }
+
+ public void onFailure(Throwable caught) {
+ if (caught instanceof TDGWTSessionExpiredException) {
+ getEventBus()
+ .fireEvent(
+ new SessionExpiredEvent(
+ SessionExpiredType.EXPIREDONSERVER));
+ } else {
+
+ if (caught instanceof TDGWTIsLockedException) {
+ Log.error(caught.getLocalizedMessage());
+ showErrorAndHide("Error Locked",
+ caught.getLocalizedMessage(), "",
+ caught);
+ } else {
+ showErrorAndHide(
+ "Error",
+ "Error retrienving tabular resource info: ",
+ caught.getLocalizedMessage(), caught);
+
+ }
+ }
+
+ }
+
+ });
+
+ }
+
+
+
protected void goNext() {
try {
- DestinationSelectionCard destCard = new DestinationSelectionCard(
+ /*DestinationSelectionCard destCard = new DestinationSelectionCard(
exportSession);
getWizardWindow().addCard(destCard);
+ getWizardWindow().nextCard();*/
+
+ Log.info("NextCard JSONWorkspaceSelectionCard");
+ JSONWorkSpaceSelectionCard jsonWorkspaceSelectionCard = new JSONWorkSpaceSelectionCard(
+ exportSession);
+ getWizardWindow().addCard(
+ jsonWorkspaceSelectionCard);
getWizardWindow().nextCard();
+
+
} catch (Exception e) {
Log.error("sayNextCard :" + e.getLocalizedMessage());
}
diff --git a/templates/changelog.xml b/templates/changelog.xml
index 707c49d..58b8542 100644
--- a/templates/changelog.xml
+++ b/templates/changelog.xml
@@ -1,4 +1,8 @@
+
+ Fixed Layout
+ Updated dependencies
+
Updated dependency