From c86546ea06571d58a2121daf26d87aa9ee654bdf Mon Sep 17 00:00:00 2001 From: Giancarlo Panichi Date: Wed, 11 Mar 2015 15:07:56 +0000 Subject: [PATCH] Added Open TR with parameter on url git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-portlet@113569 82a268e6-3cf1-43bd-a215-b396298e98cf --- .../user/td/client/TabularDataController.java | 36 ++++++++++--------- .../client/template/TemplateApplyPanel.java | 2 +- 2 files changed, 20 insertions(+), 18 deletions(-) diff --git a/src/main/java/org/gcube/portlets/user/td/client/TabularDataController.java b/src/main/java/org/gcube/portlets/user/td/client/TabularDataController.java index 102d0af..623c18b 100644 --- a/src/main/java/org/gcube/portlets/user/td/client/TabularDataController.java +++ b/src/main/java/org/gcube/portlets/user/td/client/TabularDataController.java @@ -339,22 +339,29 @@ public class TabularDataController { // public void restoreUISession() { - TDGWTServiceAsync.INSTANCE.restoreUISession(new AsyncCallback() { + String value = com.google.gwt.user.client.Window.Location + .getParameter("TabularResourceId"); + TRId startTRId = new TRId(value); - public void onFailure(Throwable caught) { + TDGWTServiceAsync.INSTANCE.restoreUISession(startTRId, + new AsyncCallback() { - } - - public void onSuccess(TRId trId) { - if (trId != null) { - if (trId.getId() != null && !trId.getId().isEmpty()) { - openTable(trId); + public void onFailure(Throwable caught) { + UtilsGXT3.alert("Error", + caught.getLocalizedMessage()); + } - } - } + public void onSuccess(TRId trId) { + if (trId != null) { + if (trId.getId() != null && !trId.getId().isEmpty()) { + openTable(trId); + } + } - }); + } + + }); } @@ -1988,8 +1995,6 @@ public class TabularDataController { UtilsGXT3.alert("Error", "No tabular resource present"); } } - - private void openGeometryCreatePoint() { Log.debug("Request Geometry Create Point Tab"); @@ -2005,7 +2010,6 @@ public class TabularDataController { } } - private void openDownscaleCSquare() { openDownscaleCSquare(null, null); } @@ -2024,9 +2028,7 @@ public class TabularDataController { UtilsGXT3.alert("Error", "No tabular resource present"); } } - - - + private void openBackgroundMonitor() { Log.debug("Request Open Monitor Background Tab"); WidgetRequestEvent e = new WidgetRequestEvent( diff --git a/src/main/java/org/gcube/portlets/user/td/client/template/TemplateApplyPanel.java b/src/main/java/org/gcube/portlets/user/td/client/template/TemplateApplyPanel.java index 473da8b..5b8bd14 100644 --- a/src/main/java/org/gcube/portlets/user/td/client/template/TemplateApplyPanel.java +++ b/src/main/java/org/gcube/portlets/user/td/client/template/TemplateApplyPanel.java @@ -247,7 +247,7 @@ public class TemplateApplyPanel extends FramedPanel { v.add(toolBarHead, new VerticalLayoutData(1, -1, new Margins(0))); v.add(grid, new VerticalLayoutData(-1, -1, new Margins(0))); v.add(toolBar, new VerticalLayoutData(1, 25, new Margins(0))); - v.add(flowButton, new VerticalLayoutData(-1, 36, + v.add(flowButton, new VerticalLayoutData(1, 36, new Margins(5, 2, 5, 2))); add(v);