=== modified file 'local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/reportmanagement/action/DefineReportAssociationsAction.java' --- local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/reportmanagement/action/DefineReportAssociationsAction.java 2011-04-27 17:15:13 +0000 +++ local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/reportmanagement/action/DefineReportAssociationsAction.java 2011-06-17 10:53:09 +0000 @@ -1,8 +1,6 @@ package org.hisp.dhis.reports.reportmanagement.action; -import java.util.Collection; import java.util.HashSet; -import java.util.Set; import org.hisp.dhis.organisationunit.OrganisationUnit; import org.hisp.dhis.oust.manager.SelectionTreeManager; @@ -56,6 +54,16 @@ public String execute() throws Exception { + Report_in report = reportService.getReport( reportId ); + + + report.updateOrganisationUnits( new HashSet( selectionTreeManager.getReloadedSelectedOrganisationUnits() ) ); + + reportService.updateReport( report ); + + + /* + Collection rootUnits = selectionTreeManager.getRootOrganisationUnits(); Set unitsInTheTree = new HashSet(); @@ -75,7 +83,7 @@ report.setSources( assignedSources ); reportService.updateReport( report ); - + */ return SUCCESS; } @@ -83,6 +91,7 @@ // Supportive methods // ------------------------------------------------------------------------- + /* private void getUnitsInTheTree( Collection rootUnits, Set unitsInTheTree ) { for ( OrganisationUnit root : rootUnits ) @@ -91,4 +100,5 @@ getUnitsInTheTree( root.getChildren(), unitsInTheTree ); } } + */ } === modified file 'local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/reportmanagement/action/SetupAssociationsTreeAction.java' --- local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/reportmanagement/action/SetupAssociationsTreeAction.java 2011-04-27 17:15:13 +0000 +++ local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/reportmanagement/action/SetupAssociationsTreeAction.java 2011-06-17 10:53:09 +0000 @@ -1,10 +1,5 @@ package org.hisp.dhis.reports.reportmanagement.action; -import java.util.Collection; -import java.util.HashSet; -import java.util.Set; - -import org.hisp.dhis.organisationunit.OrganisationUnit; import org.hisp.dhis.oust.manager.SelectionTreeManager; import org.hisp.dhis.reports.ReportService; import org.hisp.dhis.reports.Report_in; === modified file 'local/in/dhis-web-reports-national/src/main/resources/META-INF/dhis/beans.xml' --- local/in/dhis-web-reports-national/src/main/resources/META-INF/dhis/beans.xml 2011-06-15 06:10:53 +0000 +++ local/in/dhis-web-reports-national/src/main/resources/META-INF/dhis/beans.xml 2011-06-17 10:53:09 +0000 @@ -66,7 +66,7 @@ - @@ -76,7 +76,7 @@ - + --> - - - + --> /dhis-web-reports/responseReportManagementInput.vm plainTextError - @@ -68,7 +67,7 @@ - defineReportAssociationsFormChain @@ -78,8 +77,14 @@ /dhis-web-reports/menu.vm /dhis-web-reports/reportAssociations.vm ../dhis-web-commons/oust/oust.js,javascript/reportManagementAssociations.js - - + --> + + /main.vm + /dhis-web-reports/menu.vm + /dhis-web-reports/reportAssociations.vm + ../dhis-web-commons/oust/oust.js,javascript/reportManagementAssociations.js + @@ -87,33 +92,33 @@ - getNumberOfLevelsSelectLevelChain - + --> - getNumberOfLevelsSelectLevelChain getNumberOfLevelsSelectLevelChain - + --> - getNumberOfLevelsSelectLevelChain getNumberOfLevelsSelectLevelChain - + --> - getReportSelectLevelChain @@ -123,7 +128,7 @@ /dhis-web-reports/menu.vm /dhis-web-reports/reportAssociations.vm ../dhis-web-commons/oust/oust.js,javascript/reportManagementAssociations.js - + -->