← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 4011: Fixed issue with system setting for infrastructural period type

 

------------------------------------------------------------
revno: 4011
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2011-06-23 18:42:13 +0200
message:
  Fixed issue with system setting for infrastructural period type
modified:
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/systemSettings.vm
  dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetInfrastructuralDataElementMapValuesAction.java
  dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/InitializeAction.java
  dhis-2/dhis-web/dhis-web-mapping/src/main/resources/META-INF/dhis/beans.xml


--
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-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/systemSettings.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/systemSettings.vm	2011-06-12 09:54:51 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/systemSettings.vm	2011-06-23 16:42:13 +0000
@@ -70,7 +70,7 @@
 <p>
 <select name="infrastructuralPeriodType" style="width:30em">
     #foreach ( $type in $periodTypes )
-    <option value="$type.name" #if( $type.name == $configuration.infrastructuralPeriodType.name )selected="selected"#end>$type.name</option>
+    <option value="$type.name" #if( $type.name == $configuration.infrastructuralPeriodTypeDefaultIfNull.name )selected="selected"#end>$type.name</option>
     #end
 </select>
 </p>

=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetInfrastructuralDataElementMapValuesAction.java'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetInfrastructuralDataElementMapValuesAction.java	2011-06-08 13:52:49 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetInfrastructuralDataElementMapValuesAction.java	2011-06-23 16:42:13 +0000
@@ -31,9 +31,6 @@
 
 import org.hisp.dhis.aggregation.AggregatedMapValue;
 import org.hisp.dhis.mapping.MappingService;
-import org.hisp.dhis.period.Period;
-import org.hisp.dhis.period.PeriodService;
-import org.hisp.dhis.system.util.DateUtils;
 
 import com.opensymphony.xwork2.Action;
 

=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/InitializeAction.java'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/InitializeAction.java	2011-06-08 13:52:49 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/InitializeAction.java	2011-06-23 16:42:13 +0000
@@ -40,7 +40,6 @@
 import org.hisp.dhis.mapping.MapView;
 import org.hisp.dhis.mapping.MappingService;
 import org.hisp.dhis.mapping.comparator.MapLayerNameComparator;
-import org.hisp.dhis.period.PeriodService;
 import org.hisp.dhis.period.PeriodType;
 import org.hisp.dhis.user.UserSettingService;
 
@@ -78,13 +77,6 @@
         this.configurationService = configurationService;
     }
     
-    private PeriodService periodService;
-
-    public void setPeriodService( PeriodService periodService )
-    {
-        this.periodService = periodService;
-    }
-
     // -------------------------------------------------------------------------
     // Input
     // -------------------------------------------------------------------------
@@ -171,7 +163,7 @@
 
         infrastructuralDataElements = configurationService.getConfiguration().getInfrastructuralDataElements();
         
-        infrastructuralPeriodType = configurationService.getConfiguration().getInfrastructuralPeriodType();
+        infrastructuralPeriodType = configurationService.getConfiguration().getInfrastructuralPeriodTypeDefaultIfNull();
 
         return SUCCESS;
     }

=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/resources/META-INF/dhis/beans.xml	2011-06-23 16:19:53 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/resources/META-INF/dhis/beans.xml	2011-06-23 16:42:13 +0000
@@ -16,8 +16,7 @@
         scope="prototype">
 		<property name="mappingService" ref="org.hisp.dhis.mapping.MappingService" />
         <property name="userSettingService" ref="org.hisp.dhis.user.UserSettingService" />
-        <property name="configurationService" ref="org.hisp.dhis.configuration.ConfigurationService" />      
-        <property name="periodService" ref="org.hisp.dhis.period.PeriodService" />
+        <property name="configurationService" ref="org.hisp.dhis.configuration.ConfigurationService" />
     </bean>
 
 	<!-- OrganisationUnit -->