dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #02451
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 817: fixed generate report by organisation group bug
------------------------------------------------------------
revno: 817
committer: Tran Thanh Tri <Tran Thanh Tri@compaq>
branch nick: trunk
timestamp: Sat 2009-10-03 12:55:31 +0700
message:
fixed generate report by organisation group bug
modified:
dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/export/advance/action/GenerateAdvancedReportExcelCategoryAction.java
dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/export/advance/action/GenerateAdvancedReportExcelNormalAction.java
dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/export/advance/action/GenerateAdvancedReportExcelOrganisationGroupListingAction.java
dhis-2/dhis-web/dhis-web-excel-reporting/src/main/resources/META-INF/dhis/beans.xml
dhis-2/dhis-web/dhis-web-excel-reporting/src/main/resources/struts.xml
dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/javascript/export.js
--
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-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/export/advance/action/GenerateAdvancedReportExcelCategoryAction.java'
--- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/export/advance/action/GenerateAdvancedReportExcelCategoryAction.java 2009-10-02 02:58:42 +0000
+++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/export/advance/action/GenerateAdvancedReportExcelCategoryAction.java 2009-10-03 05:55:31 +0000
@@ -24,7 +24,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package org.hisp.dhis.reportexcel.export.action;
+package org.hisp.dhis.reportexcel.export.advance.action;
import java.io.BufferedInputStream;
import java.io.FileInputStream;
@@ -112,15 +112,7 @@
}
- outputReportWorkbook.write();
-
- outputReportWorkbook.close();
-
- outputXLS = outputReportFile.getName();
-
- inputStream = new BufferedInputStream( new FileInputStream( outputReportFile ) );
-
- outputReportFile.delete();
+ this.complete();
statementManager.destroy();
=== modified file 'dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/export/advance/action/GenerateAdvancedReportExcelNormalAction.java'
--- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/export/advance/action/GenerateAdvancedReportExcelNormalAction.java 2009-10-02 02:58:42 +0000
+++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/export/advance/action/GenerateAdvancedReportExcelNormalAction.java 2009-10-03 05:55:31 +0000
@@ -27,8 +27,6 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-import java.io.BufferedInputStream;
-import java.io.FileInputStream;
import java.util.Collection;
import java.util.Iterator;
import java.util.Set;
@@ -82,10 +80,9 @@
// Action implementation
// ---------------------------------------------------------------------
- public String execute()
+ public String execute()throws Exception
{
- try
- {
+
Period period = selectionManager.getSelectedPeriod();
this.installExcelFormat();
@@ -93,7 +90,7 @@
this.installPeriod( period );
OrganisationUnitGroup organisationUnitGroup = organisationUnitGroupService
- .getOrganisationUnitGroup( organisationGroupId.intValue() );
+ .getOrganisationUnitGroup( organisationGroupId );
Set<OrganisationUnit> organisationList = organisationUnitGroup.getMembers();
@@ -127,25 +124,14 @@
}
- outputReportWorkbook.write();
-
- outputReportWorkbook.close();
-
- outputXLS = outputReportFile.getName();
-
- inputStream = new BufferedInputStream( new FileInputStream( outputReportFile ) );
-
- outputReportFile.delete();
+ this.complete();
statementManager.destroy();
return SUCCESS;
- }
- catch ( Exception ex )
- {
- ex.printStackTrace();
- }
- return ERROR;
+
+
+
}
}
=== modified file 'dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/export/advance/action/GenerateAdvancedReportExcelOrganisationGroupListingAction.java'
--- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/export/advance/action/GenerateAdvancedReportExcelOrganisationGroupListingAction.java 2009-10-02 02:58:42 +0000
+++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/export/advance/action/GenerateAdvancedReportExcelOrganisationGroupListingAction.java 2009-10-03 05:55:31 +0000
@@ -113,15 +113,7 @@
}
- outputReportWorkbook.write();
-
- outputReportWorkbook.close();
-
- outputXLS = outputReportFile.getName();
-
- inputStream = new BufferedInputStream( new FileInputStream( outputReportFile ) );
-
- outputReportFile.delete();
+ this.complete();
statementManager.destroy();
=== modified file 'dhis-2/dhis-web/dhis-web-excel-reporting/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/resources/META-INF/dhis/beans.xml 2009-10-02 02:58:42 +0000
+++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/resources/META-INF/dhis/beans.xml 2009-10-03 05:55:31 +0000
@@ -328,10 +328,10 @@
<property name="selectionManager"
ref="org.hisp.dhis.reportexcel.export.action.SelectionManager" />
</bean>
-
+
<bean id="org.hisp.dhis.reportexcel.export.action.DowloadExcelAction"
class="org.hisp.dhis.reportexcel.export.action.DowloadExcelAction"
- scope="prototype">
+ scope="prototype">
<property name="selectionManager"
ref="org.hisp.dhis.reportexcel.export.action.SelectionManager" />
</bean>
@@ -463,7 +463,7 @@
<property name="selectionManager"
ref="org.hisp.dhis.ouwt.manager.OrganisationUnitSelectionManager" />
<property name="dataSetService" ref="org.hisp.dhis.dataset.DataSetService" />
- </bean>
+ </bean>
<bean
id="org.hisp.dhis.reportexcel.dataentrystatus.action.AddDataEntryStatusAction"
@@ -565,51 +565,44 @@
<property name="organisationUnitService"
ref="org.hisp.dhis.organisationunit.OrganisationUnitService" />
</bean>
-
+
<!-- Preview Beans -->
- <bean
+ <bean
id="org.hisp.dhis.reportexcel.export.action.ValidateGenerateReportAction"
class="org.hisp.dhis.reportexcel.export.action.ValidateGenerateReportAction"
scope="prototype">
<property name="organisationUnitSelectionManager"
ref="org.hisp.dhis.ouwt.manager.OrganisationUnitSelectionManager" />
</bean>
-
- <bean
+
+ <bean
id="org.hisp.dhis.reportexcel.preview.manager.InitializePOIStylesManager"
- class="org.hisp.dhis.reportexcel.preview.manager.DefaultInitializePOIStylesManager"/>
-
- <bean
- id="org.hisp.dhis.reportexcel.preview.action.OpenPreviewReportAction"
+ class="org.hisp.dhis.reportexcel.preview.manager.DefaultInitializePOIStylesManager" />
+
+ <bean
+ id="org.hisp.dhis.reportexcel.preview.action.OpenPreviewReportAction"
class="org.hisp.dhis.reportexcel.preview.action.OpenPreviewReportAction"
- scope="prototype"/>
-
+ scope="prototype" />
+
<bean
id="org.hisp.dhis.reportexcel.preview.action.GeneratePreviewReportExcelCategoryAction"
class="org.hisp.dhis.reportexcel.preview.action.GeneratePreviewReportExcelCategoryAction"
scope="prototype">
<property name="selectionManager"
ref="org.hisp.dhis.reportexcel.export.action.SelectionManager" />
- <property name="reportService"
- ref="org.hisp.dhis.reportexcel.ReportExcelService" />
- <property name="periodService"
- ref="org.hisp.dhis.period.PeriodService" />
+ <property name="reportService" ref="org.hisp.dhis.reportexcel.ReportExcelService" />
+ <property name="periodService" ref="org.hisp.dhis.period.PeriodService" />
<property name="organisationUnitSelectionManager"
ref="org.hisp.dhis.ouwt.manager.OrganisationUnitSelectionManager" />
<property name="reportLocationManager"
ref="org.hisp.dhis.reportexcel.ReportLocationManager" />
- <property name="aggregationService"
- ref="org.hisp.dhis.aggregation.AggregationService" />
+ <property name="aggregationService" ref="org.hisp.dhis.aggregation.AggregationService" />
<property name="dataElementCategoryOptionComboService"
ref="org.hisp.dhis.dataelement.DataElementCategoryOptionComboService" />
- <property name="statementManager"
- ref="statementManager" />
- <property name="dataElementService"
- ref="org.hisp.dhis.dataelement.DataElementService" />
- <property name="currentUserService"
- ref="org.hisp.dhis.user.CurrentUserService" />
- <property name="indicatorService"
- ref="org.hisp.dhis.indicator.IndicatorService" />
+ <property name="statementManager" ref="statementManager" />
+ <property name="dataElementService" ref="org.hisp.dhis.dataelement.DataElementService" />
+ <property name="currentUserService" ref="org.hisp.dhis.user.CurrentUserService" />
+ <property name="indicatorService" ref="org.hisp.dhis.indicator.IndicatorService" />
<property name="initPOIStylesManager"
ref="org.hisp.dhis.reportexcel.preview.manager.InitializePOIStylesManager" />
</bean>
@@ -620,26 +613,19 @@
scope="prototype">
<property name="selectionManager"
ref="org.hisp.dhis.reportexcel.export.action.SelectionManager" />
- <property name="reportService"
- ref="org.hisp.dhis.reportexcel.ReportExcelService" />
- <property name="periodService"
- ref="org.hisp.dhis.period.PeriodService" />
+ <property name="reportService" ref="org.hisp.dhis.reportexcel.ReportExcelService" />
+ <property name="periodService" ref="org.hisp.dhis.period.PeriodService" />
<property name="organisationUnitSelectionManager"
ref="org.hisp.dhis.ouwt.manager.OrganisationUnitSelectionManager" />
<property name="reportLocationManager"
ref="org.hisp.dhis.reportexcel.ReportLocationManager" />
- <property name="aggregationService"
- ref="org.hisp.dhis.aggregation.AggregationService" />
+ <property name="aggregationService" ref="org.hisp.dhis.aggregation.AggregationService" />
<property name="dataElementCategoryOptionComboService"
ref="org.hisp.dhis.dataelement.DataElementCategoryOptionComboService" />
- <property name="statementManager"
- ref="statementManager" />
- <property name="dataElementService"
- ref="org.hisp.dhis.dataelement.DataElementService" />
- <property name="currentUserService"
- ref="org.hisp.dhis.user.CurrentUserService" />
- <property name="indicatorService"
- ref="org.hisp.dhis.indicator.IndicatorService" />
+ <property name="statementManager" ref="statementManager" />
+ <property name="dataElementService" ref="org.hisp.dhis.dataelement.DataElementService" />
+ <property name="currentUserService" ref="org.hisp.dhis.user.CurrentUserService" />
+ <property name="indicatorService" ref="org.hisp.dhis.indicator.IndicatorService" />
<property name="initPOIStylesManager"
ref="org.hisp.dhis.reportexcel.preview.manager.InitializePOIStylesManager" />
</bean>
@@ -650,169 +636,155 @@
scope="prototype">
<property name="selectionManager"
ref="org.hisp.dhis.reportexcel.export.action.SelectionManager" />
- <property name="reportService"
- ref="org.hisp.dhis.reportexcel.ReportExcelService" />
- <property name="periodService"
- ref="org.hisp.dhis.period.PeriodService" />
+ <property name="reportService" ref="org.hisp.dhis.reportexcel.ReportExcelService" />
+ <property name="periodService" ref="org.hisp.dhis.period.PeriodService" />
<property name="organisationUnitSelectionManager"
ref="org.hisp.dhis.ouwt.manager.OrganisationUnitSelectionManager" />
<property name="reportLocationManager"
ref="org.hisp.dhis.reportexcel.ReportLocationManager" />
- <property name="aggregationService"
- ref="org.hisp.dhis.aggregation.AggregationService" />
+ <property name="aggregationService" ref="org.hisp.dhis.aggregation.AggregationService" />
<property name="dataElementCategoryOptionComboService"
ref="org.hisp.dhis.dataelement.DataElementCategoryOptionComboService" />
- <property name="statementManager"
- ref="statementManager" />
- <property name="dataElementService"
- ref="org.hisp.dhis.dataelement.DataElementService" />
- <property name="currentUserService"
- ref="org.hisp.dhis.user.CurrentUserService" />
- <property name="indicatorService"
- ref="org.hisp.dhis.indicator.IndicatorService" />
+ <property name="statementManager" ref="statementManager" />
+ <property name="dataElementService" ref="org.hisp.dhis.dataelement.DataElementService" />
+ <property name="currentUserService" ref="org.hisp.dhis.user.CurrentUserService" />
+ <property name="indicatorService" ref="org.hisp.dhis.indicator.IndicatorService" />
<property name="initPOIStylesManager"
ref="org.hisp.dhis.reportexcel.preview.manager.InitializePOIStylesManager" />
</bean>
-
+
<bean
id="org.hisp.dhis.reportexcel.preview.action.GeneratePreviewReportExcelPeriodColumnListingAction"
class="org.hisp.dhis.reportexcel.preview.action.GeneratePreviewReportExcelPeriodColumnListingAction"
scope="prototype">
<property name="selectionManager"
ref="org.hisp.dhis.reportexcel.export.action.SelectionManager" />
- <property name="reportService"
- ref="org.hisp.dhis.reportexcel.ReportExcelService" />
- <property name="periodService"
- ref="org.hisp.dhis.period.PeriodService" />
+ <property name="reportService" ref="org.hisp.dhis.reportexcel.ReportExcelService" />
+ <property name="periodService" ref="org.hisp.dhis.period.PeriodService" />
<property name="organisationUnitSelectionManager"
ref="org.hisp.dhis.ouwt.manager.OrganisationUnitSelectionManager" />
<property name="reportLocationManager"
ref="org.hisp.dhis.reportexcel.ReportLocationManager" />
- <property name="aggregationService"
- ref="org.hisp.dhis.aggregation.AggregationService" />
+ <property name="aggregationService" ref="org.hisp.dhis.aggregation.AggregationService" />
<property name="dataElementCategoryOptionComboService"
ref="org.hisp.dhis.dataelement.DataElementCategoryOptionComboService" />
- <property name="statementManager"
- ref="statementManager" />
- <property name="dataElementService"
- ref="org.hisp.dhis.dataelement.DataElementService" />
- <property name="currentUserService"
- ref="org.hisp.dhis.user.CurrentUserService" />
- <property name="indicatorService"
- ref="org.hisp.dhis.indicator.IndicatorService" />
+ <property name="statementManager" ref="statementManager" />
+ <property name="dataElementService" ref="org.hisp.dhis.dataelement.DataElementService" />
+ <property name="currentUserService" ref="org.hisp.dhis.user.CurrentUserService" />
+ <property name="indicatorService" ref="org.hisp.dhis.indicator.IndicatorService" />
<property name="initPOIStylesManager"
ref="org.hisp.dhis.reportexcel.preview.manager.InitializePOIStylesManager" />
</bean>
- <bean id="org.hisp.dhis.reportexcel.preview.action.ExportXMLAction"
+ <bean id="org.hisp.dhis.reportexcel.preview.action.ExportXMLAction"
class="org.hisp.dhis.reportexcel.preview.action.ExportXMLAction"
scope="prototype">
<property name="reportLocationManager"
ref="org.hisp.dhis.reportexcel.ReportLocationManager" />
</bean>
-
+
<!-- GERERATE ADVANCE -->
- <bean
- id="org.hisp.dhis.reportexcel.export.advance.action.GetOrganisationUnitGroupListAction"
- class="org.hisp.dhis.reportexcel.export.advance.action.GetOrganisationUnitGroupListAction"
- scope="prototype">
- <property name="organisationUnitGroupService">
- <ref bean="org.hisp.dhis.organisationunit.OrganisationUnitGroupService" />
- </property>
- </bean>
-
- <bean
- id="org.hisp.dhis.reportexcel.export.advance.action.GenerateAdvancedReportExcelNormalAction"
- class="org.hisp.dhis.reportexcel.export.advance.action.GenerateAdvancedReportExcelNormalAction"
- scope="prototype">
- <property name="selectionManager"
- ref="org.hisp.dhis.reportexcel.export.action.SelectionManager" />
- <property name="reportService" ref="org.hisp.dhis.reportexcel.ReportExcelService" />
- <property name="periodService" ref="org.hisp.dhis.period.PeriodService" />
- <property name="organisationUnitSelectionManager"
- ref="org.hisp.dhis.ouwt.manager.OrganisationUnitSelectionManager" />
- <property name="reportLocationManager"
- ref="org.hisp.dhis.reportexcel.ReportLocationManager" />
- <property name="aggregationService" ref="org.hisp.dhis.aggregation.AggregationService" />
- <property name="dataElementCategoryOptionComboService"
- ref="org.hisp.dhis.dataelement.DataElementCategoryOptionComboService" />
- <property name="statementManager" ref="statementManager" />
- <property name="dataElementService" ref="org.hisp.dhis.dataelement.DataElementService" />
- <property name="currentUserService" ref="org.hisp.dhis.user.CurrentUserService" />
- <property name="indicatorService" ref="org.hisp.dhis.indicator.IndicatorService" />
-
- </bean>
-
- <bean
- id="org.hisp.dhis.reportexcel.export.advance.action.GenerateAdvancedReportExcelOrganisationGroupListingAction"
- class="org.hisp.dhis.reportexcel.export.advance.action.GenerateAdvancedReportExcelOrganisationGroupListingAction"
- scope="prototype">
- <property name="organisationUnitGroupService"
- ref="org.hisp.dhis.organisationunit.OrganisationUnitGroupService" />
- <property name="selectionManager"
- ref="org.hisp.dhis.reportexcel.export.action.SelectionManager" />
- <property name="reportService" ref="org.hisp.dhis.reportexcel.ReportExcelService" />
- <property name="periodService" ref="org.hisp.dhis.period.PeriodService" />
- <property name="organisationUnitSelectionManager"
- ref="org.hisp.dhis.ouwt.manager.OrganisationUnitSelectionManager" />
- <property name="reportLocationManager"
- ref="org.hisp.dhis.reportexcel.ReportLocationManager" />
- <property name="aggregationService" ref="org.hisp.dhis.aggregation.AggregationService" />
- <property name="dataElementCategoryOptionComboService"
- ref="org.hisp.dhis.dataelement.DataElementCategoryOptionComboService" />
- <property name="statementManager" ref="statementManager" />
- <property name="dataElementService" ref="org.hisp.dhis.dataelement.DataElementService" />
- <property name="currentUserService" ref="org.hisp.dhis.user.CurrentUserService" />
- <property name="indicatorService" ref="org.hisp.dhis.indicator.IndicatorService" />
-
- </bean>
-
- <bean
- id="org.hisp.dhis.reportexcel.export.advance.action.GenerateAdvancedReportExcelPeriodColumnListingAction"
- class="org.hisp.dhis.reportexcel.export.advance.action.GenerateAdvancedReportExcelPeriodColumnListingAction"
- scope="prototype">
- <property name="organisationUnitGroupService"
- ref="org.hisp.dhis.organisationunit.OrganisationUnitGroupService" />
- <property name="selectionManager"
- ref="org.hisp.dhis.reportexcel.export.action.SelectionManager" />
- <property name="reportService" ref="org.hisp.dhis.reportexcel.ReportExcelService" />
- <property name="periodService" ref="org.hisp.dhis.period.PeriodService" />
- <property name="organisationUnitSelectionManager"
- ref="org.hisp.dhis.ouwt.manager.OrganisationUnitSelectionManager" />
- <property name="reportLocationManager"
- ref="org.hisp.dhis.reportexcel.ReportLocationManager" />
- <property name="aggregationService" ref="org.hisp.dhis.aggregation.AggregationService" />
- <property name="dataElementCategoryOptionComboService"
- ref="org.hisp.dhis.dataelement.DataElementCategoryOptionComboService" />
- <property name="statementManager" ref="statementManager" />
- <property name="dataElementService" ref="org.hisp.dhis.dataelement.DataElementService" />
- <property name="currentUserService" ref="org.hisp.dhis.user.CurrentUserService" />
- <property name="indicatorService" ref="org.hisp.dhis.indicator.IndicatorService" />
-
- </bean>
-
- <bean
- id="org.hisp.dhis.reportexcel.export.advance.action.GenerateAdvancedReportExcelCategoryAction"
- class="org.hisp.dhis.reportexcel.export.advance.action.GenerateAdvancedReportExcelCategoryAction"
- scope="prototype">
- <property name="organisationUnitGroupService"
- ref="org.hisp.dhis.organisationunit.OrganisationUnitGroupService" />
- <property name="selectionManager"
- ref="org.hisp.dhis.reportexcel.export.action.SelectionManager" />
- <property name="reportService" ref="org.hisp.dhis.reportexcel.ReportExcelService" />
- <property name="periodService" ref="org.hisp.dhis.period.PeriodService" />
- <property name="organisationUnitSelectionManager"
- ref="org.hisp.dhis.ouwt.manager.OrganisationUnitSelectionManager" />
- <property name="reportLocationManager"
- ref="org.hisp.dhis.reportexcel.ReportLocationManager" />
- <property name="aggregationService" ref="org.hisp.dhis.aggregation.AggregationService" />
- <property name="dataElementCategoryOptionComboService"
- ref="org.hisp.dhis.dataelement.DataElementCategoryOptionComboService" />
- <property name="statementManager" ref="statementManager" />
- <property name="dataElementService" ref="org.hisp.dhis.dataelement.DataElementService" />
- <property name="currentUserService" ref="org.hisp.dhis.user.CurrentUserService" />
- <property name="indicatorService" ref="org.hisp.dhis.indicator.IndicatorService" />
- </bean>
+ <bean
+ id="org.hisp.dhis.reportexcel.export.advance.action.GetOrganisationUnitGroupListAction"
+ class="org.hisp.dhis.reportexcel.export.advance.action.GetOrganisationUnitGroupListAction"
+ scope="prototype">
+ <property name="organisationUnitGroupService">
+ <ref bean="org.hisp.dhis.organisationunit.OrganisationUnitGroupService" />
+ </property>
+ </bean>
+
+ <bean
+ id="org.hisp.dhis.reportexcel.export.advance.action.GenerateAdvancedReportExcelNormalAction"
+ class="org.hisp.dhis.reportexcel.export.advance.action.GenerateAdvancedReportExcelNormalAction"
+ scope="prototype">
+ <property name="selectionManager"
+ ref="org.hisp.dhis.reportexcel.export.action.SelectionManager" />
+ <property name="reportService" ref="org.hisp.dhis.reportexcel.ReportExcelService" />
+ <property name="periodService" ref="org.hisp.dhis.period.PeriodService" />
+ <property name="organisationUnitSelectionManager"
+ ref="org.hisp.dhis.ouwt.manager.OrganisationUnitSelectionManager" />
+ <property name="reportLocationManager"
+ ref="org.hisp.dhis.reportexcel.ReportLocationManager" />
+ <property name="aggregationService" ref="org.hisp.dhis.aggregation.AggregationService" />
+ <property name="dataElementCategoryOptionComboService"
+ ref="org.hisp.dhis.dataelement.DataElementCategoryOptionComboService" />
+ <property name="statementManager" ref="statementManager" />
+ <property name="dataElementService" ref="org.hisp.dhis.dataelement.DataElementService" />
+ <property name="currentUserService" ref="org.hisp.dhis.user.CurrentUserService" />
+ <property name="indicatorService" ref="org.hisp.dhis.indicator.IndicatorService" />
+ <property name="organisationUnitGroupService"
+ ref="org.hisp.dhis.organisationunit.OrganisationUnitGroupService" />
+
+ </bean>
+
+ <bean
+ id="org.hisp.dhis.reportexcel.export.advance.action.GenerateAdvancedReportExcelOrganisationGroupListingAction"
+ class="org.hisp.dhis.reportexcel.export.advance.action.GenerateAdvancedReportExcelOrganisationGroupListingAction"
+ scope="prototype">
+ <property name="organisationUnitGroupService"
+ ref="org.hisp.dhis.organisationunit.OrganisationUnitGroupService" />
+ <property name="selectionManager"
+ ref="org.hisp.dhis.reportexcel.export.action.SelectionManager" />
+ <property name="reportService" ref="org.hisp.dhis.reportexcel.ReportExcelService" />
+ <property name="periodService" ref="org.hisp.dhis.period.PeriodService" />
+ <property name="organisationUnitSelectionManager"
+ ref="org.hisp.dhis.ouwt.manager.OrganisationUnitSelectionManager" />
+ <property name="reportLocationManager"
+ ref="org.hisp.dhis.reportexcel.ReportLocationManager" />
+ <property name="aggregationService" ref="org.hisp.dhis.aggregation.AggregationService" />
+ <property name="dataElementCategoryOptionComboService"
+ ref="org.hisp.dhis.dataelement.DataElementCategoryOptionComboService" />
+ <property name="statementManager" ref="statementManager" />
+ <property name="dataElementService" ref="org.hisp.dhis.dataelement.DataElementService" />
+ <property name="currentUserService" ref="org.hisp.dhis.user.CurrentUserService" />
+ <property name="indicatorService" ref="org.hisp.dhis.indicator.IndicatorService" />
+ </bean>
+
+ <bean
+ id="org.hisp.dhis.reportexcel.export.advance.action.GenerateAdvancedReportExcelPeriodColumnListingAction"
+ class="org.hisp.dhis.reportexcel.export.advance.action.GenerateAdvancedReportExcelPeriodColumnListingAction"
+ scope="prototype">
+ <property name="organisationUnitGroupService"
+ ref="org.hisp.dhis.organisationunit.OrganisationUnitGroupService" />
+ <property name="selectionManager"
+ ref="org.hisp.dhis.reportexcel.export.action.SelectionManager" />
+ <property name="reportService" ref="org.hisp.dhis.reportexcel.ReportExcelService" />
+ <property name="periodService" ref="org.hisp.dhis.period.PeriodService" />
+ <property name="organisationUnitSelectionManager"
+ ref="org.hisp.dhis.ouwt.manager.OrganisationUnitSelectionManager" />
+ <property name="reportLocationManager"
+ ref="org.hisp.dhis.reportexcel.ReportLocationManager" />
+ <property name="aggregationService" ref="org.hisp.dhis.aggregation.AggregationService" />
+ <property name="dataElementCategoryOptionComboService"
+ ref="org.hisp.dhis.dataelement.DataElementCategoryOptionComboService" />
+ <property name="statementManager" ref="statementManager" />
+ <property name="dataElementService" ref="org.hisp.dhis.dataelement.DataElementService" />
+ <property name="currentUserService" ref="org.hisp.dhis.user.CurrentUserService" />
+ <property name="indicatorService" ref="org.hisp.dhis.indicator.IndicatorService" />
+ </bean>
+
+ <bean
+ id="org.hisp.dhis.reportexcel.export.advance.action.GenerateAdvancedReportExcelCategoryAction"
+ class="org.hisp.dhis.reportexcel.export.advance.action.GenerateAdvancedReportExcelCategoryAction"
+ scope="prototype">
+ <property name="organisationUnitGroupService"
+ ref="org.hisp.dhis.organisationunit.OrganisationUnitGroupService" />
+ <property name="selectionManager"
+ ref="org.hisp.dhis.reportexcel.export.action.SelectionManager" />
+ <property name="reportService" ref="org.hisp.dhis.reportexcel.ReportExcelService" />
+ <property name="periodService" ref="org.hisp.dhis.period.PeriodService" />
+ <property name="organisationUnitSelectionManager"
+ ref="org.hisp.dhis.ouwt.manager.OrganisationUnitSelectionManager" />
+ <property name="reportLocationManager"
+ ref="org.hisp.dhis.reportexcel.ReportLocationManager" />
+ <property name="aggregationService" ref="org.hisp.dhis.aggregation.AggregationService" />
+ <property name="dataElementCategoryOptionComboService"
+ ref="org.hisp.dhis.dataelement.DataElementCategoryOptionComboService" />
+ <property name="statementManager" ref="statementManager" />
+ <property name="dataElementService" ref="org.hisp.dhis.dataelement.DataElementService" />
+ <property name="currentUserService" ref="org.hisp.dhis.user.CurrentUserService" />
+ <property name="indicatorService" ref="org.hisp.dhis.indicator.IndicatorService" />
+ </bean>
</beans>
=== modified file 'dhis-2/dhis-web/dhis-web-excel-reporting/src/main/resources/struts.xml'
--- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/resources/struts.xml 2009-10-02 07:58:30 +0000
+++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/resources/struts.xml 2009-10-03 05:55:31 +0000
@@ -628,7 +628,7 @@
<!-- GERERATE ADVANCE -->
<action name="organisationUnitGroupList"
- class="org.hisp.dhis.oum.action.organisationunitgroup.GetOrganisationUnitGroupListAction">
+ class="org.hisp.dhis.reportexcel.export.advance.action.GetOrganisationUnitGroupListAction">
<result name="success" type="velocity-xml">
/dhis-web-excel-reporting/responseOrganisationUnitGroupObjects.vm
</result>
@@ -650,42 +650,26 @@
<action name="generateAdvancedReportExcelNormal"
class="org.hisp.dhis.reportexcel.export.advance.action.GenerateAdvancedReportExcelNormalAction">
- <result name="success" type="stream">
- <param name="contentType">application/vnd.ms-excel</param>
- <param name="inputName">inputStream</param>
- <param name="contentDisposition">filename="${outputXLS}"</param>
- <param name="bufferSize">1024</param>
- </result>
+ <result name="success" type="velocity-xml">
+ /dhis-web-excel-reporting/responseSuccess.vm</result>
</action>
<action name="generateAdvancedReportExcelOrganizationGroupListing"
class="org.hisp.dhis.reportexcel.export.advance.action.GenerateAdvancedReportExcelOrganisationGroupListingAction">
- <result name="success" type="stream">
- <param name="contentType">application/vnd.ms-excel</param>
- <param name="inputName">inputStream</param>
- <param name="contentDisposition">filename="${outputXLS}"</param>
- <param name="bufferSize">1024</param>
- </result>
+ <result name="success" type="velocity-xml">
+ /dhis-web-excel-reporting/responseSuccess.vm</result>
</action>
<action name="generateAdvancedReportExcelPeriodColumnListingAction"
class="org.hisp.dhis.reportexcel.export.advance.action.GenerateAdvancedReportExcelPeriodColumnListingAction">
- <result name="success" type="stream">
- <param name="contentType">application/vnd.ms-excel</param>
- <param name="inputName">inputStream</param>g
- <param name="contentDisposition">filename="${outputXLS}"</param>
- <param name="bufferSize">1024</param>
- </result>
+ <result name="success" type="velocity-xml">
+ /dhis-web-excel-reporting/responseSuccess.vm</result>
</action>
<action name="generateAdvancedReportExcelCategory"
class="org.hisp.dhis.reportexcel.export.action.GenerateReportExcelCategoryAction">
- <result name="success" type="stream">
- <param name="contentType">application/vnd.ms-excel</param>
- <param name="inputName">inputStream</param>
- <param name="contentDisposition">filename="${outputXLS}"</param>
- <param name="bufferSize">1024</param>
- </result>
+ <result name="success" type="velocity-xml">
+ /dhis-web-excel-reporting/responseSuccess.vm</result>
</action>
</package>
=== modified file 'dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/javascript/export.js'
--- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/javascript/export.js 2009-10-02 07:58:30 +0000
+++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/javascript/export.js 2009-10-03 05:55:31 +0000
@@ -69,15 +69,16 @@
function generateAdvancedReportExcel() {
- var reportId = $('#report').val();
- var periodId = $('#period').val();
- var organisationGroupId = byId('availableOrgunitGroups').value;
- var url = "generateAdvancedReportExcel.action?reportId=" + reportId ;
- url += "&periodId=" + periodId ;
- url += "&organisationGroupId=" + organisationGroupId;
- url += "&reportType=normal";
-
- window.location = url;
+ $("#loading").showAtCenter( true );
+ $.post("generateAdvancedReportExcel.action",{
+ reportId:$('#report').val(),
+ periodId:$('#period').val(),
+ organisationGroupId:$('#availableOrgunitGroups').val()
+ },function(data){
+ window.location = "downloadExcelOutput.action";
+ deleteDivEffect();
+ $("#loading").hide();
+ },'xml');
}