dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #18519
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 7842: Made html default report table data format
------------------------------------------------------------
revno: 7842
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2012-08-02 14:39:33 +0200
message:
Made html default report table data format
modified:
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/ReportTableController.java
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/ReportTableController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/ReportTableController.java 2012-05-28 14:25:12 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/ReportTableController.java 2012-08-02 12:39:33 +0000
@@ -47,7 +47,6 @@
import org.hisp.dhis.system.util.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
-import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
@@ -100,7 +99,7 @@
//--------------------------------------------------------------------------
@RequestMapping( value = "/data", method = RequestMethod.GET )
- public String getReportTableDynamicData( @RequestParam( required = false, value = "in" ) List<String> indicators,
+ public void getReportTableDynamicDataHtml( @RequestParam( required = false, value = "in" ) List<String> indicators,
@RequestParam( required = false, value = "de" ) List<String> dataElements,
@RequestParam( required = false, value = "ds" ) List<String> dataSets,
@RequestParam( value = "ou" ) List<String> orgUnits,
@@ -108,16 +107,15 @@
@RequestParam( required = false ) boolean orgUnitIsParent,
@RequestParam( required = false ) boolean minimal,
RelativePeriods relatives,
- Model model,
HttpServletResponse response ) throws Exception
{
Grid grid = getReportTableDynamicGrid( indicators, dataElements, dataSets,
orgUnits, crossTab, orgUnitIsParent, minimal, relatives, response );
- model.addAttribute( "model", grid );
- model.addAttribute( "viewClass", "detailed" );
+ String filename = DATA_NAME + ".html";
+ contextUtils.configureResponse( response, ContextUtils.CONTENT_TYPE_HTML, CacheStrategy.RESPECT_SYSTEM_SETTING, filename, false );
- return grid != null ? "reportTableData" : null;
+ GridUtils.toHtml( grid, response.getWriter() );
}
@RequestMapping( value = "/data.xml", method = RequestMethod.GET )
@@ -140,26 +138,6 @@
GridUtils.toXml( grid, response.getOutputStream() );
}
- @RequestMapping( value = "/data.html", method = RequestMethod.GET )
- public void getReportTableDynamicDataHtml( @RequestParam( required = false, value = "in" ) List<String> indicators,
- @RequestParam( required = false, value = "de" ) List<String> dataElements,
- @RequestParam( required = false, value = "ds" ) List<String> dataSets,
- @RequestParam( value = "ou" ) List<String> orgUnits,
- @RequestParam( required = false, value = "crosstab" ) List<String> crossTab,
- @RequestParam( required = false ) boolean orgUnitIsParent,
- @RequestParam( required = false ) boolean minimal,
- RelativePeriods relatives,
- HttpServletResponse response ) throws Exception
- {
- Grid grid = getReportTableDynamicGrid( indicators, dataElements, dataSets,
- orgUnits, crossTab, orgUnitIsParent, minimal, relatives, response );
-
- String filename = DATA_NAME + ".html";
- contextUtils.configureResponse( response, ContextUtils.CONTENT_TYPE_HTML, CacheStrategy.RESPECT_SYSTEM_SETTING, filename, false );
-
- GridUtils.toHtml( grid, response.getWriter() );
- }
-
@RequestMapping( value = "/data.pdf", method = RequestMethod.GET )
public void getReportTableDynamicDataPdf( @RequestParam( required = false, value = "in" ) List<String> indicators,
@RequestParam( required = false, value = "de" ) List<String> dataElements,
@@ -272,18 +250,6 @@
//--------------------------------------------------------------------------
@RequestMapping( value = "/{uid}/data", method = RequestMethod.GET )
- public String getReportTableData( @PathVariable( "uid" ) String uid, Model model,
- @RequestParam( value = "ou", required = false ) String organisationUnitUid,
- @RequestParam( value = "pe", required = false ) String period,
- HttpServletResponse response ) throws Exception
- {
- model.addAttribute( "model", getReportTableGrid( uid, organisationUnitUid, period ) );
- model.addAttribute( "viewClass", "detailed" );
-
- return "grid";
- }
-
- @RequestMapping( value = "/{uid}/data.html", method = RequestMethod.GET )
public void getReportTableHtml( @PathVariable( "uid" ) String uid,
@RequestParam( value = "ou", required = false ) String organisationUnitUid,
@RequestParam( value = "pe", required = false ) String period,