dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #13946
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 4583: updated add/update DE/I/OU actions to include attributes
------------------------------------------------------------
revno: 4583
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2011-09-14 12:14:11 +0200
message:
updated add/update DE/I/OU actions to include attributes
modified:
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelement/ShowAddDataElementForm.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelement/ShowUpdateDataElementFormAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelement/UpdateDataElementAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/indicator/ShowUpdateIndicatorFormAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/indicatortype/GetIndicatorTypeListAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/META-INF/dhis/beans.xml
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/organisationunit/GetOrganisationUnitAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/organisationunit/PrepareAddOrganisationUnitAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/resources/META-INF/dhis/beans.xml
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/resources/struts.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-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelement/ShowAddDataElementForm.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelement/ShowAddDataElementForm.java 2011-09-14 09:22:51 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelement/ShowAddDataElementForm.java 2011-09-14 10:14:11 +0000
@@ -36,6 +36,7 @@
import org.hisp.dhis.attribute.AttributeService;
import org.hisp.dhis.attribute.AttributeValue;
import org.hisp.dhis.attribute.Attribute;
+import org.hisp.dhis.attribute.comparator.AttributeNameComparator;
import org.hisp.dhis.dataelement.DataElementCategoryCombo;
import org.hisp.dhis.dataelement.DataElementCategoryService;
import org.hisp.dhis.dataelement.DataElementGroup;
@@ -144,6 +145,8 @@
attributes = new ArrayList<Attribute>( attributeService.getDataElementAttributes() );
+ Collections.sort( attributes, new AttributeNameComparator() );
+
return SUCCESS;
}
}
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelement/ShowUpdateDataElementFormAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelement/ShowUpdateDataElementFormAction.java 2011-05-11 04:58:00 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelement/ShowUpdateDataElementFormAction.java 2011-09-14 10:14:11 +0000
@@ -30,9 +30,14 @@
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
+import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import org.hisp.dhis.attribute.Attribute;
+import org.hisp.dhis.attribute.AttributeService;
+import org.hisp.dhis.attribute.AttributeValue;
+import org.hisp.dhis.attribute.comparator.AttributeNameComparator;
import org.hisp.dhis.dataelement.DataElement;
import org.hisp.dhis.dataelement.DataElementCategoryCombo;
import org.hisp.dhis.dataelement.DataElementCategoryService;
@@ -76,6 +81,13 @@
this.organisationUnitService = organisationUnitService;
}
+ private AttributeService attributeService;
+
+ public void setAttributeService( AttributeService attributeService )
+ {
+ this.attributeService = attributeService;
+ }
+
// -------------------------------------------------------------------------
// Input/output
// -------------------------------------------------------------------------
@@ -129,6 +141,13 @@
return defaultCategoryCombo;
}
+ public Map<Attribute, AttributeValue> attributeMap = new HashMap<Attribute, AttributeValue>();
+
+ public Map<Attribute, AttributeValue> getAttributeMap()
+ {
+ return attributeMap;
+ }
+
// -------------------------------------------------------------------------
// Action implementation
// -------------------------------------------------------------------------
@@ -138,17 +157,17 @@
defaultCategoryCombo = dataElementCategoryService
.getDataElementCategoryComboByName( DataElementCategoryCombo.DEFAULT_CATEGORY_COMBO_NAME );
- dataElementCategoryCombos = new ArrayList<DataElementCategoryCombo>( dataElementCategoryService
- .getAllDataElementCategoryCombos() );
+ dataElementCategoryCombos = new ArrayList<DataElementCategoryCombo>(
+ dataElementCategoryService.getAllDataElementCategoryCombos() );
Collections.sort( dataElementCategoryCombos, new DataElementCategoryComboNameComparator() );
-
+
dataElement = dataElementService.getDataElement( id );
organisationUnitLevels = organisationUnitService.getOrganisationUnitLevels();
Map<Integer, OrganisationUnitLevel> levelMap = organisationUnitService.getOrganisationUnitLevelMap();
-
+
for ( Integer level : dataElement.getAggregationLevels() )
{
aggregationLevels.add( levelMap.get( level ) );
@@ -156,6 +175,29 @@
organisationUnitLevels.removeAll( aggregationLevels );
+ List<AttributeValue> dataElementAttributeValues = new ArrayList<AttributeValue>(
+ dataElement.getAttributeValues() );
+
+ List<Attribute> attributes = new ArrayList<Attribute>( attributeService.getDataElementAttributes() );
+
+ Collections.sort( attributes, new AttributeNameComparator() );
+
+ // TODO fix this.. quite ugly and slow
+ for ( Attribute key : attributes )
+ {
+ AttributeValue value = null;
+
+ for ( AttributeValue av : dataElementAttributeValues )
+ {
+ if ( value.getAttribute().equals( key ) )
+ {
+ value = av;
+ }
+ }
+
+ attributeMap.put( key, value );
+ }
+
return SUCCESS;
}
}
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelement/UpdateDataElementAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelement/UpdateDataElementAction.java 2011-09-08 15:28:20 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelement/UpdateDataElementAction.java 2011-09-14 10:14:11 +0000
@@ -138,21 +138,21 @@
{
this.domainType = domainType;
}
-
+
private String numberType;
public void setNumberType( String numberType )
{
this.numberType = numberType;
}
-
+
private String valueType;
public void setValueType( String valueType )
{
this.valueType = valueType;
}
-
+
private String aggregationOperator;
public void setAggregationOperator( String aggregationOperator )
@@ -212,7 +212,7 @@
{
description = null;
}
-
+
if ( formName != null && formName.trim().length() == 0 )
{
formName = null;
@@ -240,9 +240,10 @@
dataElement.setAggregationOperator( aggregationOperator );
dataElement.setUrl( url );
dataElement.setCategoryCombo( categoryCombo );
- dataElement.setAggregationLevels( new ArrayList<Integer>( ConversionUtils.getIntegerCollection( aggregationLevels ) ) );
+ dataElement.setAggregationLevels( new ArrayList<Integer>( ConversionUtils
+ .getIntegerCollection( aggregationLevels ) ) );
dataElement.setZeroIsSignificant( zeroIsSignificant );
-
+
Set<DataSet> dataSets = dataElement.getDataSets();
for ( DataSet dataSet : dataSets )
{
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/indicator/ShowUpdateIndicatorFormAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/indicator/ShowUpdateIndicatorFormAction.java 2011-05-30 08:58:59 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/indicator/ShowUpdateIndicatorFormAction.java 2011-09-14 10:14:11 +0000
@@ -29,8 +29,14 @@
import java.util.ArrayList;
import java.util.Collections;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
+import org.hisp.dhis.attribute.Attribute;
+import org.hisp.dhis.attribute.AttributeService;
+import org.hisp.dhis.attribute.AttributeValue;
+import org.hisp.dhis.attribute.comparator.AttributeNameComparator;
import org.hisp.dhis.indicator.Indicator;
import org.hisp.dhis.indicator.IndicatorService;
import org.hisp.dhis.indicator.IndicatorType;
@@ -57,6 +63,13 @@
this.indicatorService = indicatorService;
}
+ private AttributeService attributeService;
+
+ public void setAttributeService( AttributeService attributeService )
+ {
+ this.attributeService = attributeService;
+ }
+
// -------------------------------------------------------------------------
// Input/output
// -------------------------------------------------------------------------
@@ -96,6 +109,13 @@
return indicatorTypes;
}
+ public Map<Attribute, AttributeValue> attributeMap = new HashMap<Attribute, AttributeValue>();
+
+ public Map<Attribute, AttributeValue> getAttributeMap()
+ {
+ return attributeMap;
+ }
+
// -------------------------------------------------------------------------
// Action implementation
// -------------------------------------------------------------------------
@@ -115,6 +135,28 @@
Collections.sort( indicatorTypes, new IndicatorTypeNameComparator() );
+ List<AttributeValue> indicatorAttributeValues = new ArrayList<AttributeValue>( indicator.getAttributeValues() );
+
+ List<Attribute> attributes = new ArrayList<Attribute>( attributeService.getIndicatorAttributes() );
+
+ Collections.sort( attributes, new AttributeNameComparator() );
+
+ // TODO fix this.. quite ugly and slow
+ for ( Attribute key : attributes )
+ {
+ AttributeValue value = null;
+
+ for ( AttributeValue av : indicatorAttributeValues )
+ {
+ if ( value.getAttribute().equals( key ) )
+ {
+ value = av;
+ }
+ }
+
+ attributeMap.put( key, value );
+ }
+
return SUCCESS;
}
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/indicatortype/GetIndicatorTypeListAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/indicatortype/GetIndicatorTypeListAction.java 2011-05-06 11:10:34 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/indicatortype/GetIndicatorTypeListAction.java 2011-09-14 10:14:11 +0000
@@ -33,6 +33,9 @@
import java.util.Collections;
import java.util.List;
+import org.hisp.dhis.attribute.Attribute;
+import org.hisp.dhis.attribute.AttributeService;
+import org.hisp.dhis.attribute.comparator.AttributeNameComparator;
import org.hisp.dhis.indicator.IndicatorService;
import org.hisp.dhis.indicator.IndicatorType;
import org.hisp.dhis.indicator.comparator.IndicatorTypeNameComparator;
@@ -40,7 +43,8 @@
/**
* @author Torgeir Lorange Ostby
- * @version $Id: GetIndicatorTypeListAction.java 3305 2007-05-14 18:55:52Z larshelg $
+ * @version $Id: GetIndicatorTypeListAction.java 3305 2007-05-14 18:55:52Z
+ * larshelg $
*/
public class GetIndicatorTypeListAction
extends ActionPagingSupport<IndicatorType>
@@ -60,7 +64,14 @@
{
this.indicatorService = indicatorService;
}
-
+
+ private AttributeService attributeService;
+
+ public void setAttributeService( AttributeService attributeService )
+ {
+ this.attributeService = attributeService;
+ }
+
// -------------------------------------------------------------------------
// Input & Output
// -------------------------------------------------------------------------
@@ -71,14 +82,21 @@
{
return indicatorTypes;
}
-
+
private String key;
-
+
public String getKey()
{
return key;
}
+ private List<Attribute> attributes;
+
+ public List<Attribute> getAttributes()
+ {
+ return attributes;
+ }
+
public void setKey( String key )
{
this.key = key;
@@ -93,18 +111,24 @@
if ( isNotBlank( key ) ) // Filter on key only if set
{
this.paging = createPaging( indicatorService.getIndicatorTypeCountByName( key ) );
-
- indicatorTypes = new ArrayList<IndicatorType>( indicatorService.getIndicatorTypesBetweenByName( key, paging.getStartPos(), paging.getPageSize() ) );
+
+ indicatorTypes = new ArrayList<IndicatorType>( indicatorService.getIndicatorTypesBetweenByName( key,
+ paging.getStartPos(), paging.getPageSize() ) );
}
else
{
this.paging = createPaging( indicatorService.getIndicatorTypeCount() );
-
- indicatorTypes = new ArrayList<IndicatorType>( indicatorService.getIndicatorTypesBetween( paging.getStartPos(), paging.getPageSize() ) );
+
+ indicatorTypes = new ArrayList<IndicatorType>( indicatorService.getIndicatorTypesBetween(
+ paging.getStartPos(), paging.getPageSize() ) );
}
Collections.sort( indicatorTypes, new IndicatorTypeNameComparator() );
+ attributes = new ArrayList<Attribute>( attributeService.getDataElementAttributes() );
+
+ Collections.sort( attributes, new AttributeNameComparator() );
+
return SUCCESS;
}
}
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/META-INF/dhis/beans.xml 2011-09-14 09:22:51 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/META-INF/dhis/beans.xml 2011-09-14 10:14:11 +0000
@@ -111,6 +111,7 @@
<property name="organisationUnitService">
<ref bean="org.hisp.dhis.organisationunit.OrganisationUnitService" />
</property>
+ <property name="attributeService" ref="org.hisp.dhis.attribute.AttributeService" />
</bean>
<bean id="org.hisp.dhis.dd.action.dataelement.ValidateDataElementAction" class="org.hisp.dhis.dd.action.dataelement.ValidateDataElementAction"
@@ -374,6 +375,7 @@
<property name="indicatorService">
<ref bean="org.hisp.dhis.indicator.IndicatorService" />
</property>
+ <property name="attributeService" ref="org.hisp.dhis.attribute.AttributeService" />
</bean>
<bean id="org.hisp.dhis.dd.action.indicatortype.GetIndicatorTypeAction" class="org.hisp.dhis.dd.action.indicatortype.GetIndicatorTypeAction"
@@ -466,6 +468,7 @@
<property name="indicatorService">
<ref bean="org.hisp.dhis.indicator.IndicatorService" />
</property>
+ <property name="attributeService" ref="org.hisp.dhis.attribute.AttributeService" />
</bean>
<bean id="org.hisp.dhis.dd.action.indicator.UpdateIndicatorAction" class="org.hisp.dhis.dd.action.indicator.UpdateIndicatorAction"
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/organisationunit/GetOrganisationUnitAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/organisationunit/GetOrganisationUnitAction.java 2011-05-22 12:19:06 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/organisationunit/GetOrganisationUnitAction.java 2011-09-14 10:14:11 +0000
@@ -29,8 +29,14 @@
import java.util.ArrayList;
import java.util.Collections;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
+import org.hisp.dhis.attribute.Attribute;
+import org.hisp.dhis.attribute.AttributeService;
+import org.hisp.dhis.attribute.AttributeValue;
+import org.hisp.dhis.attribute.comparator.AttributeNameComparator;
import org.hisp.dhis.dataset.DataSet;
import org.hisp.dhis.dataset.DataSetService;
import org.hisp.dhis.dataset.comparator.DataSetNameComparator;
@@ -44,8 +50,6 @@
/**
* @author Torgeir Lorange Ostby
- * @version $Id: GetOrganisationUnitAction.java 1898 2006-09-22 12:06:56Z
- * torgeilo $
*/
public class GetOrganisationUnitAction
implements Action
@@ -75,6 +79,13 @@
this.dataSetService = dataSetService;
}
+ private AttributeService attributeService;
+
+ public void setAttributeService( AttributeService attributeService )
+ {
+ this.attributeService = attributeService;
+ }
+
// -------------------------------------------------------------------------
// Input/output
// -------------------------------------------------------------------------
@@ -121,6 +132,13 @@
return groupSets;
}
+ public Map<Attribute, AttributeValue> attributeMap = new HashMap<Attribute, AttributeValue>();
+
+ public Map<Attribute, AttributeValue> getAttributeMap()
+ {
+ return attributeMap;
+ }
+
// -------------------------------------------------------------------------
// Action implementation
// -------------------------------------------------------------------------
@@ -137,13 +155,34 @@
dataSets = new ArrayList<DataSet>( organisationUnit.getDataSets() );
- groupSets = new ArrayList<OrganisationUnitGroupSet>( organisationUnitGroupService
- .getCompulsoryOrganisationUnitGroupSetsWithMembers() );
+ groupSets = new ArrayList<OrganisationUnitGroupSet>(
+ organisationUnitGroupService.getCompulsoryOrganisationUnitGroupSetsWithMembers() );
+
+ List<AttributeValue> organisationUnitAttributeValues = new ArrayList<AttributeValue>(
+ organisationUnit.getAttributeValues() );
+
+ List<Attribute> attributes = new ArrayList<Attribute>( attributeService.getOrganisationUnitAttributes() );
+
+ Collections.sort( attributes, new AttributeNameComparator() );
+
+ // TODO fix this.. quite ugly and slow
+ for ( Attribute key : attributes )
+ {
+ AttributeValue value = null;
+
+ for ( AttributeValue av : organisationUnitAttributeValues )
+ {
+ if ( value.getAttribute().equals( key ) )
+ {
+ value = av;
+ }
+ }
+
+ attributeMap.put( key, value );
+ }
Collections.sort( availableDataSets, new DataSetNameComparator() );
-
Collections.sort( dataSets, new DataSetNameComparator() );
-
Collections.sort( groupSets, new OrganisationUnitGroupSetNameComparator() );
return SUCCESS;
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/organisationunit/PrepareAddOrganisationUnitAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/organisationunit/PrepareAddOrganisationUnitAction.java 2011-05-22 12:19:06 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/organisationunit/PrepareAddOrganisationUnitAction.java 2011-09-14 10:14:11 +0000
@@ -32,6 +32,9 @@
import java.util.Date;
import java.util.List;
+import org.hisp.dhis.attribute.Attribute;
+import org.hisp.dhis.attribute.AttributeService;
+import org.hisp.dhis.attribute.comparator.AttributeNameComparator;
import org.hisp.dhis.dataset.DataSet;
import org.hisp.dhis.dataset.DataSetService;
import org.hisp.dhis.dataset.comparator.DataSetNameComparator;
@@ -67,6 +70,13 @@
this.organisationUnitGroupService = organisationUnitGroupService;
}
+ private AttributeService attributeService;
+
+ public void setAttributeService( AttributeService attributeService )
+ {
+ this.attributeService = attributeService;
+ }
+
// -------------------------------------------------------------------------
// Output
// -------------------------------------------------------------------------
@@ -92,6 +102,13 @@
return groupSets;
}
+ private List<Attribute> attributes;
+
+ public List<Attribute> getAttributes()
+ {
+ return attributes;
+ }
+
// -------------------------------------------------------------------------
// Action implementation
// -------------------------------------------------------------------------
@@ -102,13 +119,15 @@
dataSets = new ArrayList<DataSet>( dataSetService.getAllDataSets() );
- groupSets = new ArrayList<OrganisationUnitGroupSet>( organisationUnitGroupService
- .getCompulsoryOrganisationUnitGroupSetsWithMembers() );
+ groupSets = new ArrayList<OrganisationUnitGroupSet>(
+ organisationUnitGroupService.getCompulsoryOrganisationUnitGroupSetsWithMembers() );
+
+ attributes = new ArrayList<Attribute>( attributeService.getDataElementAttributes() );
Collections.sort( dataSets, new DataSetNameComparator() );
-
Collections.sort( groupSets, new OrganisationUnitGroupSetNameComparator() );
-
+ Collections.sort( attributes, new AttributeNameComparator() );
+
return SUCCESS;
}
}
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/resources/META-INF/dhis/beans.xml 2011-09-14 03:44:56 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/resources/META-INF/dhis/beans.xml 2011-09-14 10:14:11 +0000
@@ -5,7 +5,7 @@
<bean id="org.hisp.dhis.oum.action.NoAction" class="org.hisp.dhis.oum.action.NoAction" scope="prototype" />
- <!-- OrganisationUnit -->
+ <!-- OrganisationUnit -->
<bean id="org.hisp.dhis.oum.action.organisationunit.GetOrganisationUnitListAction" class="org.hisp.dhis.oum.action.organisationunit.GetOrganisationUnitListAction"
scope="prototype">
@@ -25,6 +25,7 @@
<property name="dataSetService">
<ref bean="org.hisp.dhis.dataset.DataSetService" />
</property>
+ <property name="attributeService" ref="org.hisp.dhis.attribute.AttributeService" />
</bean>
<bean id="org.hisp.dhis.oum.action.organisationunit.ValidateOrganisationUnitAction" class="org.hisp.dhis.oum.action.organisationunit.ValidateOrganisationUnitAction"
@@ -98,9 +99,10 @@
<property name="organisationUnitGroupService">
<ref bean="org.hisp.dhis.organisationunit.OrganisationUnitGroupService" />
</property>
+ <property name="attributeService" ref="org.hisp.dhis.attribute.AttributeService" />
</bean>
- <!-- PDF -->
+ <!-- PDF -->
<bean id="org.hisp.dhis.oum.action.pdf.ExportToPdfAction" class="org.hisp.dhis.oum.action.pdf.ExportToPdfAction"
scope="prototype">
@@ -108,14 +110,14 @@
<ref bean="exportServiceProvider" />
</property>
<property name="selectionManager">
- <ref bean="org.hisp.dhis.ouwt.manager.OrganisationUnitSelectionManager" />
- </property>
+ <ref bean="org.hisp.dhis.ouwt.manager.OrganisationUnitSelectionManager" />
+ </property>
<property name="organisationUnitService">
- <ref bean="org.hisp.dhis.organisationunit.OrganisationUnitService" />
- </property>
+ <ref bean="org.hisp.dhis.organisationunit.OrganisationUnitService" />
+ </property>
</bean>
-
- <!-- OrganisationUnitGroup -->
+
+ <!-- OrganisationUnitGroup -->
<bean id="org.hisp.dhis.oum.action.organisationunitgroup.GetOrganisationUnitGroupListAction" class="org.hisp.dhis.oum.action.organisationunitgroup.GetOrganisationUnitGroupListAction"
scope="prototype">
@@ -178,7 +180,7 @@
</property>
</bean>
- <!-- OrganisationUnitGroupSet -->
+ <!-- OrganisationUnitGroupSet -->
<bean id="org.hisp.dhis.oum.action.organisationunitgroupset.GetGroupSetListAction" class="org.hisp.dhis.oum.action.organisationunitgroupset.GetGroupSetListAction"
scope="prototype">
@@ -228,8 +230,8 @@
<ref bean="org.hisp.dhis.organisationunit.OrganisationUnitGroupService" />
</property>
</bean>
-
- <!-- Hierarchy operations -->
+
+ <!-- Hierarchy operations -->
<bean id="org.hisp.dhis.oum.action.hierarchy.GetSelectedOrganisationUnitAction" class="org.hisp.dhis.oum.action.hierarchy.GetSelectedOrganisationUnitAction"
scope="prototype">
@@ -268,7 +270,7 @@
</property>
</bean>
- <!-- OrganisationUnitLevel -->
+ <!-- OrganisationUnitLevel -->
<bean id="org.hisp.dhis.oum.action.organisationunitlevel.GetOrganisationUnitLevelsAction" class="org.hisp.dhis.oum.action.organisationunitlevel.GetOrganisationUnitLevelsAction"
scope="prototype">
@@ -279,8 +281,8 @@
scope="prototype">
<property name="organisationUnitService" ref="org.hisp.dhis.organisationunit.OrganisationUnitService" />
</bean>
-
- <!-- OrganisationUnit Search -->
+
+ <!-- OrganisationUnit Search -->
<bean id="org.hisp.dhis.oum.action.search.SearchOrganisationUnitsAction" class="org.hisp.dhis.oum.action.search.SearchOrganisationUnitsAction"
scope="prototype">
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/resources/struts.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/resources/struts.xml 2011-09-14 03:44:56 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/resources/struts.xml 2011-09-14 10:14:11 +0000
@@ -57,8 +57,7 @@
</action>
<action name="assignOrganisationUnitToGroups" class="org.hisp.dhis.oum.action.organisationunit.AssignOrganisationUnitToGroupsAction">
- <result name="success" type="redirect">getCompulsoryGroupSet.action?organisationUnitId=${organisationUnitId}
- </result>
+ <result name="success" type="redirect">getCompulsoryGroupSet.action?organisationUnitId=${organisationUnitId}</result>
</action>
<action name="showUpdateOrganisationUnitForm" class="org.hisp.dhis.oum.action.organisationunit.GetOrganisationUnitAction">
@@ -84,8 +83,8 @@
<param name="onExceptionReturn">plainTextError</param>
<param name="requiredAuthorities">F_ORGANISATIONUNIT_DELETE</param>
</action>
-
- <!-- PDF -->
+
+ <!-- PDF -->
<action name="exportToPdf" class="org.hisp.dhis.oum.action.pdf.ExportToPdfAction">
<result name="success" type="stream">
@@ -271,12 +270,12 @@
<result name="success" type="velocity">/main.vm</result>
<param name="page">/dhis-web-maintenance-organisationunit/saveOrganisationUnitLevelForm.vm</param>
<param name="menu">/dhis-web-maintenance-organisationunit/menu.vm</param>
- <param name="requiredAuthorities">F_ORGANISATIONUNITLEVEL_UPDATE</param>
+ <param name="requiredAuthorities">F_ORGANISATIONUNITLEVEL_UPDATE</param>
</action>
<action name="saveOrganisationUnitLevels" class="org.hisp.dhis.oum.action.organisationunitlevel.SaveOrganisationUnitLevelsAction">
<result name="success" type="redirect">index.action</result>
- <param name="requiredAuthorities">F_ORGANISATIONUNITLEVEL_UPDATE</param>
+ <param name="requiredAuthorities">F_ORGANISATIONUNITLEVEL_UPDATE</param>
</action>
<!-- OrganisationUnit Search -->