diff --git a/distro/changelog.xml b/distro/changelog.xml index f6906ee..ddaad0b 100644 --- a/distro/changelog.xml +++ b/distro/changelog.xml @@ -1,4 +1,8 @@ + + Fix back button behavior [issue #3249] + Added support to WorkspaceExplorer [issue #428] diff --git a/pom.xml b/pom.xml index b7ff665..55a99ae 100644 --- a/pom.xml +++ b/pom.xml @@ -13,7 +13,7 @@ 4.0.0 org.gcube.portlets.user tabular-data-manager - 2.9.0-SNAPSHOT + 2.10.0-SNAPSHOT war diff --git a/src/main/java/org/gcube/portlets/user/td/client/TabularDataPortlet.java b/src/main/java/org/gcube/portlets/user/td/client/TabularDataPortlet.java index 3fd6ebf..8f623e9 100644 --- a/src/main/java/org/gcube/portlets/user/td/client/TabularDataPortlet.java +++ b/src/main/java/org/gcube/portlets/user/td/client/TabularDataPortlet.java @@ -1,16 +1,21 @@ package org.gcube.portlets.user.td.client; + +import org.gcube.portlets.user.gcubewidgets.client.ClientScopeHelper; import org.gcube.portlets.user.td.client.ribbon.TabularDataRibbon; import org.gcube.portlets.user.td.client.rpc.TabularDataService; import org.gcube.portlets.user.td.client.rpc.TabularDataServiceAsync; import org.gcube.portlets.user.td.mainboxwidget.client.MainBoxPanel; import org.gcube.portlets.user.td.toolboxwidget.client.ToolBoxPanel; +import org.gcube.portlets.user.td.wizardwidget.client.util.UtilsGXT3; import com.allen_sauer.gwt.log.client.Log; import com.google.gwt.core.client.EntryPoint; 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.user.client.Window.Location; +import com.google.gwt.user.client.rpc.AsyncCallback; import com.google.gwt.user.client.ui.RootPanel; import com.google.web.bindery.event.shared.EventBus; import com.sencha.gxt.core.client.util.Margins; @@ -58,13 +63,34 @@ public class TabularDataPortlet implements EntryPoint { // onModuleLoad2 Scheduler.get().scheduleDeferred(new ScheduledCommand() { public void execute() { - loadMainPanel(); + loadScope(); } }); } + + 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!"); + } + } - protected void loadMainPanel() { + @Override + public void onFailure(Throwable caught) { + UtilsGXT3.alert("Error", "Error setting scope: "+caught.getLocalizedMessage()); + caught.printStackTrace(); + } + }); + + } + + private void loadMainPanel() { TabularDataController controller = new TabularDataController(); EventBus eventBus = controller.getEventBus(); @@ -116,7 +142,7 @@ public class TabularDataPortlet implements EntryPoint { controller.restoreUISession(); } - protected void bind(BorderLayoutContainer mainWidget) { + private void bind(BorderLayoutContainer mainWidget) { try { RootPanel root = RootPanel.get(JSP_TAG_ID); Log.info("Root Panel: " + root); diff --git a/src/main/webapp/WEB-INF/web.xml b/src/main/webapp/WEB-INF/web.xml index ec1941e..800dda4 100644 --- a/src/main/webapp/WEB-INF/web.xml +++ b/src/main/webapp/WEB-INF/web.xml @@ -11,21 +11,22 @@ jUnitHostImpl com.google.gwt.junit.server.JUnitHostImpl - - + + + + scopeService + org.gcube.portlets.user.gcubewidgets.server.ScopeServiceImpl + + tdservlet org.gcube.portlets.user.td.mainboxwidget.server.TabularDataServiceImpl 1 - - + + @@ -43,25 +44,25 @@ TDGWTService org.gcube.portlets.user.td.gwtservice.server.TDGWTServiceImpl - + RetrieveChartFileServlet org.gcube.portlets.user.td.gwtservice.server.RetrieveChartFileServlet - + RetrieveFileAndDiscoverMimeTypeServlet org.gcube.portlets.user.td.gwtservice.server.RetrieveFileAndDiscoverMimeTypeServlet - + TDRStudioServlet org.gcube.portlets.user.td.gwtservice.server.TDRStudioServlet - + @@ -91,12 +92,12 @@ tdTemplateServiceImpl org.gcube.portlets.user.tdtemplate.server.TdTemplateServiceImpl - + templateColumnOperationService org.gcube.portlets.user.tdtemplateoperation.server.TemplateColumnOperationServiceImpl - + @@ -123,15 +124,15 @@ org.gcube.portlets.user.td.gwtservice.server.CodelistMappingUploadServlet - - - + + + workspaceExplorer org.gcube.portlets.widgets.wsexplorer.server.WorkspaceExplorerServiceImpl - + @@ -143,7 +144,7 @@ uploadServlet org.gcube.portlets.user.workspace.server.UploadServlet --> - + @@ -151,38 +152,38 @@ org.gcube.portlets.widgets.sessionchecker.server.SessionCheckerServiceImpl - - + + StatisticalManagerAlgorithmsWidgetServlet org.gcube.portlets.widgets.StatisticalManagerAlgorithmsWidget.server.StatisticalManagerWidgetServiceImpl - + DownloadService org.gcube.portlets.widgets.StatisticalManagerAlgorithmsWidget.server.DownloadServlet - + tdwService org.gcube.portlets.user.tdw.server.TabularDataServiceImpl - - + + tdwServlet org.gcube.portlets.user.tdw.server.TabularDataServlet - - - + + + TDLogsServlet org.gcube.portlets.user.td.gwtservice.server.TDLogsServlet - - + + @@ -191,8 +192,13 @@ jUnitHostImpl /tabulardataportlet/junithost/* - - + + + scopeService + /tabulardataportlet/scopeService + + + tdservlet @@ -215,20 +221,20 @@ TDGWTService /tabulardataportlet/TDGWTService - + RetrieveChartFileServlet /tabulardataportlet/RetrieveChartFileServlet - + RetrieveFileAndDiscoverMimeTypeServlet /tabulardataportlet/RetrieveFileAndDiscoverMimeTypeServlet - - + + TDRStudioServlet /tabulardataportlet/TDRStudioServlet @@ -262,12 +268,12 @@ tdTemplateServiceImpl /tabulardataportlet/tdtemplate - - + + templateColumnOperationService /tabulardataportlet/templateColumnOperationService - + @@ -291,13 +297,13 @@ CodelistMappingUploadServlet /tabulardataportlet/CodelistMappingUploadServlet - + workspaceExplorer /tabulardataportlet/WorkspaceExplorerService - + TDLogsServlet /tabulardataportlet/TDLogsServlet - + tabulardataportlet.html