refs #3249: TDM - Fix back button behavior
https://support.d4science.org/issues/3249 git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-portlet@128056 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
634904a6a8
commit
b659a1aa7d
|
@ -1,4 +1,8 @@
|
|||
<ReleaseNotes>
|
||||
<Changeset component="org.gcube.portlets-user.tabular-data-portlet.2-10-0"
|
||||
date="2015-10-15">
|
||||
<Change>Fix back button behavior [issue #3249]</Change>
|
||||
</Changeset>
|
||||
<Changeset component="org.gcube.portlets-user.tabular-data-portlet.2-9-0"
|
||||
date="2015-10-15">
|
||||
<Change>Added support to WorkspaceExplorer [issue #428]</Change>
|
||||
|
|
2
pom.xml
2
pom.xml
|
@ -13,7 +13,7 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.gcube.portlets.user</groupId>
|
||||
<artifactId>tabular-data-manager</artifactId>
|
||||
<version>2.9.0-SNAPSHOT</version>
|
||||
<version>2.10.0-SNAPSHOT</version>
|
||||
<packaging>war</packaging>
|
||||
|
||||
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
protected void loadMainPanel() {
|
||||
private void loadScope() {
|
||||
ClientScopeHelper.getService().setScope(Location.getHref(),
|
||||
new AsyncCallback<Boolean>() {
|
||||
@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() {
|
||||
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);
|
||||
|
|
|
@ -12,6 +12,11 @@
|
|||
<servlet-class>com.google.gwt.junit.server.JUnitHostImpl</servlet-class>
|
||||
</servlet>
|
||||
|
||||
<!-- Scope Helper -->
|
||||
<servlet>
|
||||
<servlet-name>scopeService</servlet-name>
|
||||
<servlet-class>org.gcube.portlets.user.gcubewidgets.server.ScopeServiceImpl</servlet-class>
|
||||
</servlet>
|
||||
|
||||
<!-- Base Service -->
|
||||
<servlet>
|
||||
|
@ -20,12 +25,8 @@
|
|||
<load-on-startup>1</load-on-startup>
|
||||
</servlet>
|
||||
|
||||
<!-- Base Service
|
||||
<servlet>
|
||||
<servlet-name>tdservlet</servlet-name>
|
||||
<servlet-class>org.gcube.portlets.user.td.server.TabularDataServiceImpl</servlet-class>
|
||||
<load-on-startup>1</load-on-startup>
|
||||
</servlet>-->
|
||||
<!-- Base Service <servlet> <servlet-name>tdservlet</servlet-name> <servlet-class>org.gcube.portlets.user.td.server.TabularDataServiceImpl</servlet-class>
|
||||
<load-on-startup>1</load-on-startup> </servlet> -->
|
||||
|
||||
<!-- TDWidget -->
|
||||
<servlet>
|
||||
|
@ -192,6 +193,11 @@
|
|||
<url-pattern>/tabulardataportlet/junithost/*</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
<servlet-mapping>
|
||||
<servlet-name>scopeService</servlet-name>
|
||||
<url-pattern>/tabulardataportlet/scopeService</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
|
||||
<!-- Base Service -->
|
||||
<servlet-mapping>
|
||||
|
|
Loading…
Reference in New Issue