diff --git a/.classpath b/.classpath
index 4d7d684..b8700c9 100644
--- a/.classpath
+++ b/.classpath
@@ -1,12 +1,12 @@
-
+
-
+
@@ -45,5 +45,5 @@
-
+
diff --git a/distro/changelog.xml b/distro/changelog.xml
index f6911f3..b457798 100644
--- a/distro/changelog.xml
+++ b/distro/changelog.xml
@@ -1,4 +1,7 @@
+
+ Fixed back button behavior [Ticket #3283]
+
First Release
diff --git a/pom.xml b/pom.xml
index 7503491..d85e392 100644
--- a/pom.xml
+++ b/pom.xml
@@ -8,12 +8,12 @@
1.0.0
-
+
4.0.0
org.gcube.portlets.user
statistical-algorithms-importer
- 1.0.0-SNAPSHOT
+ 1.1.0-SNAPSHOT
war
diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/StatAlgoImporter.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/StatAlgoImporter.java
index 9931c21..2f01d9d 100644
--- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/StatAlgoImporter.java
+++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/StatAlgoImporter.java
@@ -1,11 +1,13 @@
package org.gcube.portlets.user.statisticalalgorithmsimporter.client;
+import org.gcube.portlets.user.gcubewidgets.client.ClientScopeHelper;
import org.gcube.portlets.user.statisticalalgorithmsimporter.client.maindata.MainDataPanel;
import org.gcube.portlets.user.statisticalalgorithmsimporter.client.resource.StatAlgoImporterResources;
import org.gcube.portlets.user.statisticalalgorithmsimporter.client.ribbon.StatAlgoImporterRibbon;
import org.gcube.portlets.user.statisticalalgorithmsimporter.client.rpc.StatAlgoImporterService;
import org.gcube.portlets.user.statisticalalgorithmsimporter.client.rpc.StatAlgoImporterServiceAsync;
import org.gcube.portlets.user.statisticalalgorithmsimporter.client.tools.ToolsPanel;
+import org.gcube.portlets.user.statisticalalgorithmsimporter.client.utils.UtilsGXT3;
import com.allen_sauer.gwt.log.client.Log;
import com.google.gwt.core.client.EntryPoint;
@@ -13,6 +15,8 @@ import com.google.gwt.core.client.GWT;
import com.google.gwt.core.client.Scheduler;
import com.google.gwt.core.client.Scheduler.ScheduledCommand;
import com.google.gwt.event.shared.EventBus;
+import com.google.gwt.user.client.Window.Location;
+import com.google.gwt.user.client.rpc.AsyncCallback;
import com.google.gwt.user.client.ui.RootPanel;
import com.sencha.gxt.core.client.util.Margins;
import com.sencha.gxt.widget.core.client.container.BorderLayoutContainer;
@@ -20,7 +24,7 @@ import com.sencha.gxt.widget.core.client.container.BorderLayoutContainer.BorderL
import com.sencha.gxt.widget.core.client.container.MarginData;
import com.sencha.gxt.widget.core.client.container.Viewport;
-/**
+/**
*
* @author "Giancarlo Panichi" g.panichi@isti.cnr.it
@@ -54,13 +58,37 @@ public class StatAlgoImporter implements EntryPoint {
// onModuleLoad2
Scheduler.get().scheduleDeferred(new ScheduledCommand() {
public void execute() {
- loadMainPanel();
+ loadScope();
}
});
}
- protected void loadMainPanel() {
+ private void loadScope() {
+ ClientScopeHelper.getService().setScope(Location.getHref(),
+ new AsyncCallback() {
+ @Override
+ public void onSuccess(Boolean result) {
+ if (result) {
+ loadMainPanel();
+ } else {
+ UtilsGXT3
+ .info("Attention",
+ "ClientScopeHelper has returned a false value!");
+ }
+ }
+
+ @Override
+ public void onFailure(Throwable caught) {
+ UtilsGXT3.alert("Error", "Error setting scope: "
+ + caught.getLocalizedMessage());
+ caught.printStackTrace();
+ }
+ });
+
+ }
+
+ private void loadMainPanel() {
StatAlgoImporterResources.INSTANCE.saiStyles().ensureInjected();
// ScriptInjector.fromString(AccountingManagerResources.INSTANCE.jqueryJs().getText()).setWindow(ScriptInjector.TOP_WINDOW).inject();
@@ -72,7 +100,7 @@ public class StatAlgoImporter implements EntryPoint {
mainPanelLayout.setId("mainPanelLayout");
mainPanelLayout.setBorders(false);
mainPanelLayout.setResize(true);
-
+
// mainPanelLayout.getElement().getStyle().setBackgroundColor("rgb(3, 126, 207)");
// Main
@@ -101,14 +129,13 @@ public class StatAlgoImporter implements EntryPoint {
eastData.setCollapseMini(true);
eastData.setMargins(new Margins(0, 5, 0, 5));
eastData.setCollapseHidden(false);
-
-
+
// estData.setMaxSize(510);
// estData.setMinSize(310);
mainPanelLayout.setEastWidget(toolsPanel, eastData);
toolsPanel.enable();
toolsPanel.collapse();
-
+
bind(mainPanelLayout);
controller.setMainPanelLayout(mainPanelLayout);
controller.restoreUISession();
diff --git a/src/main/webapp/WEB-INF/web.xml b/src/main/webapp/WEB-INF/web.xml
index 0b199ea..8bc6cb1 100644
--- a/src/main/webapp/WEB-INF/web.xml
+++ b/src/main/webapp/WEB-INF/web.xml
@@ -19,6 +19,12 @@
org.gcube.portlets.widgets.sessionchecker.server.SessionCheckerServiceImpl
+
+
+ scopeService
+ org.gcube.portlets.user.gcubewidgets.server.ScopeServiceImpl
+
+
StatAlgoImporterService
@@ -92,6 +98,11 @@
/statalgoimporter/workspaceUploadServletStream
+
+
+ scopeService
+ /statalgoimporter/scopeService
+