Minor Update
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-widgetx@95484 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
0ac054a52f
commit
cb7af38ecc
|
@ -128,51 +128,13 @@ public class TabularDataXServlet extends HttpServlet {
|
||||||
}
|
}
|
||||||
logger.debug("Filters:" + filtersList.size());
|
logger.debug("Filters:" + filtersList.size());
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* // SORTING DIRECTION String sortDirectionParameter = request
|
|
||||||
* .getParameter(ServletParameters.SORTDIR);
|
|
||||||
* logger.trace("sortDirectionParameter: " +
|
|
||||||
* sortDirectionParameter); Direction direction =
|
|
||||||
* (sortDirectionParameter == null) ? Direction.ASC :
|
|
||||||
* Direction.valueOf(sortDirectionParameter);
|
|
||||||
*
|
|
||||||
* // SORTING COLUMN String sortColumn = request
|
|
||||||
* .getParameter(ServletParameters.SORTFIELD);
|
|
||||||
* logger.trace("sortColumn: " + sortColumn);
|
|
||||||
*
|
|
||||||
* // START String startParameter = request
|
|
||||||
* .getParameter(ServletParameters.OFFSET);
|
|
||||||
* logger.trace("startParameter: " + startParameter); int start =
|
|
||||||
* Integer.parseInt(startParameter);
|
|
||||||
*
|
|
||||||
* // LIMIT String limitParameter = request
|
|
||||||
* .getParameter(ServletParameters.LIMIT);
|
|
||||||
* logger.trace("limitParameter: " + limitParameter); int limit =
|
|
||||||
* Integer.parseInt(limitParameter);
|
|
||||||
*/
|
|
||||||
|
|
||||||
DataSourceX dataSource = SessionUtil.getDataSource(
|
DataSourceX dataSource = SessionUtil.getDataSource(
|
||||||
request.getSession(), tdSessionId);
|
request.getSession(), tdSessionId);
|
||||||
String json = dataSource.getDataAsJSon(start, limit, sortColumn,
|
String json = dataSource.getDataAsJSon(start, limit, sortColumn,
|
||||||
direction, filtersList);
|
direction, filtersList);
|
||||||
|
|
||||||
/*
|
|
||||||
* DataSourceX dataSource = SessionUtil.getDataSource(
|
|
||||||
* request.getSession(), tdSessionId); int start =
|
|
||||||
* Integer.parseInt(requestData.getOffset()); int limit =
|
|
||||||
* Integer.parseInt(requestData.getLimit());
|
|
||||||
* ArrayList<SortInformation> sorts = requestData.getSorts();
|
|
||||||
*
|
|
||||||
* Direction direction = Direction.ASC; String sortColumn = null;
|
|
||||||
* for (SortInformation sort : sorts) { direction =
|
|
||||||
* (sort.getSortDir() == null) ? Direction.ASC :
|
|
||||||
* Direction.valueOf(sort.getSortDir()); sortColumn =
|
|
||||||
* sort.getSortField(); }
|
|
||||||
*
|
|
||||||
* String json = dataSource.getDataAsJSon(start, limit, sortColumn,
|
|
||||||
* direction);
|
|
||||||
*/
|
|
||||||
response.getOutputStream().write(json.getBytes());
|
response.getOutputStream().write(json.getBytes());
|
||||||
response.setStatus(HttpServletResponse.SC_OK);
|
response.setStatus(HttpServletResponse.SC_OK);
|
||||||
// logger.trace("JSON: "+json);
|
// logger.trace("JSON: "+json);
|
||||||
|
|
Loading…
Reference in New Issue