From 147f59a863c58ea4080113ff8e90a4b79a53c773 Mon Sep 17 00:00:00 2001 From: Giancarlo Panichi Date: Thu, 2 Feb 2017 10:15:51 +0000 Subject: [PATCH] refs 5870: TDM - adding new functionalities to portlets Task-Url: https://support.d4science.org/issues/5870 Updated to support SDMX Dataset export git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-widgetx@142046 82a268e6-3cf1-43bd-a215-b396298e98cf --- .../portlets/user/tdwx/client/TabularDataXGridPanel.java | 4 +++- .../portlets/user/tdwx/server/TabularDataXServlet.java | 8 +++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/gcube/portlets/user/tdwx/client/TabularDataXGridPanel.java b/src/main/java/org/gcube/portlets/user/tdwx/client/TabularDataXGridPanel.java index 8ed2aa4..77d970a 100644 --- a/src/main/java/org/gcube/portlets/user/tdwx/client/TabularDataXGridPanel.java +++ b/src/main/java/org/gcube/portlets/user/tdwx/client/TabularDataXGridPanel.java @@ -720,7 +720,9 @@ public class TabularDataXGridPanel extends ContentPanel { reader = new DataRowPagingReader(tableDefinition); String path = GWT.getModuleBaseURL() - + Constants.TABULAR_DATA_X_SERVLET; + + Constants.TABULAR_DATA_X_SERVLET + "?" + + Constants.CURR_GROUP_ID + "=" + + GCubeClientContext.getCurrentContextId(); RequestBuilder builder = new RequestBuilder(RequestBuilder.POST, path); builder.setHeader(ServletParameters.TD_SESSION_ID, diff --git a/src/main/java/org/gcube/portlets/user/tdwx/server/TabularDataXServlet.java b/src/main/java/org/gcube/portlets/user/tdwx/server/TabularDataXServlet.java index 3e0bfcb..cfa6a03 100644 --- a/src/main/java/org/gcube/portlets/user/tdwx/server/TabularDataXServlet.java +++ b/src/main/java/org/gcube/portlets/user/tdwx/server/TabularDataXServlet.java @@ -4,6 +4,7 @@ import java.io.IOException; import java.io.InputStreamReader; import java.io.StringWriter; import java.util.ArrayList; +import java.util.Enumeration; import javax.servlet.ServletException; import javax.servlet.ServletInputStream; @@ -51,7 +52,12 @@ public class TabularDataXServlet extends HttpServlet { protected void handleRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { logger.debug("TabularDataServlet handleRequest"); - + logger.debug("Request Headers: "); + Enumeration headers=request.getHeaderNames(); + while(headers.hasMoreElements()){ + String hName=headers.nextElement(); + logger.debug("Header: "+hName+" = "+request.getHeader(hName)); + } try {