From 1f35e6a01263e2c8fd0f6c63546f84dd8e0f65f2 Mon Sep 17 00:00:00 2001 From: Giancarlo Panichi Date: Wed, 25 Jan 2017 17:34:23 +0000 Subject: [PATCH] refs 6548: TDM - Migrate TabMan to new PortalContext Task-Url: https://support.d4science.org/issues/6548 Updated to new PortalContext git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-csv-import-widget@141797 82a268e6-3cf1-43bd-a215-b396298e98cf --- pom.xml | 6 +----- .../td/csvimportwidget/client/csvgrid/CSVGrid.java | 11 ++++++++--- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/pom.xml b/pom.xml index 9867a2a..6f6e551 100644 --- a/pom.xml +++ b/pom.xml @@ -142,11 +142,7 @@ home-library provided - - org.gcube.portlets.user - gcube-widgets - provided - + com.allen-sauer.gwt.log diff --git a/src/main/java/org/gcube/portlets/user/td/csvimportwidget/client/csvgrid/CSVGrid.java b/src/main/java/org/gcube/portlets/user/td/csvimportwidget/client/csvgrid/CSVGrid.java index 0801fee..d3e38cd 100644 --- a/src/main/java/org/gcube/portlets/user/td/csvimportwidget/client/csvgrid/CSVGrid.java +++ b/src/main/java/org/gcube/portlets/user/td/csvimportwidget/client/csvgrid/CSVGrid.java @@ -5,9 +5,11 @@ package org.gcube.portlets.user.td.csvimportwidget.client.csvgrid; import java.util.ArrayList; +import org.gcube.portal.clientcontext.client.GCubeClientContext; import org.gcube.portlets.user.td.csvimportwidget.client.data.CSVRow; import org.gcube.portlets.user.td.csvimportwidget.client.data.CSVRowKeyProvider; import org.gcube.portlets.user.td.csvimportwidget.client.data.CSVRowValueProvider; +import org.gcube.portlets.user.td.gwtservice.shared.Constants; import org.gcube.portlets.user.td.widgetcommonevent.client.CommonMessages; import org.gcube.portlets.user.td.wizardwidget.client.util.UtilsGXT3; @@ -35,7 +37,7 @@ import com.sencha.gxt.widget.core.client.grid.RowNumberer; */ public class CSVGrid extends Grid { - private static final String csvImportFileServlet = "CSVImportFileServlet"; + //private static final String csvImportFileServlet = "CSVImportFileServlet"; private CSVGridView gridViewSample; private CSVGridMessages msgs; private CommonMessages msgsCommon; @@ -78,12 +80,15 @@ public class CSVGrid extends Grid { ListStore store=null; try { - String path = GWT.getModuleBaseURL() + csvImportFileServlet; + String path = GWT.getModuleBaseURL() + Constants.CSV_IMPORT_FILE_SERVLET; Log.info("CSVImportFileServlet path:" + path); // use a http proxy to get the data RequestBuilder builder = new RequestBuilder(RequestBuilder.GET, path); - + + builder.setHeader(Constants.CURR_GROUP_ID, + GCubeClientContext.getCurrentContextId()); + HttpProxy proxy = new HttpProxy( builder);