dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #08643
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 2113: Centralized some common ajax requests. Should maybe centralized even further by using the web api.
------------------------------------------------------------
revno: 2113
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Sat 2010-11-20 09:23:34 +0100
message:
Centralized some common ajax requests. Should maybe centralized even further by using the web api.
removed:
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/responseDataElement.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/responseDataElementGroup.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/responseDataElementGroupSet.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/responseIndicator.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/responseIndicatorGroup.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/responseIndicatorGroupSet.vm
added:
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonDataElementGroup.vm
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonIndicatorGroup.vm
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonIndicatorGroupSet.vm
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/xmlDataElementGroup.vm
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/xmlDataElementGroupSet.vm
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/xmlDataElementGroups.vm
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/xmlIndicatorGroup.vm
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/xmlIndicatorGroupSet.vm
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/xmlIndicatorGroups.vm
dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetDataElementGroupAction.java
dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetDataElementGroupSetAction.java
dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetIndicatorGroupAction.java
dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetIndicatorGroupSetAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/indicatorGroup.js
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/indicatorGroupSet.js
modified:
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/xmlDataElement.vm
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/xmlDataElements.vm
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/xmlDataSet.vm
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/xmlIndicator.vm
dhis-2/dhis-web/dhis-web-commons/src/main/resources/META-INF/dhis/beans.xml
dhis-2/dhis-web/dhis-web-commons/src/main/resources/dhis-web-commons.xml
dhis-2/dhis-web/dhis-web-commons/src/main/resources/i18n_global.properties
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/struts.xml
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/indicator.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/indicatorGroup.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/indicatorGroupSet.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/dataElement.js
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/dataElementGroup.js
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/dataElementGroupSet.js
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/indicator.js
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/resources/struts.xml
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/javascript/dataSet.js
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/responseDataSetObject.vm
--
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
=== added file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonDataElementGroup.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonDataElementGroup.vm 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonDataElementGroup.vm 2010-11-20 08:23:34 +0000
@@ -0,0 +1,7 @@
+{ "dataElementGroup":
+ {
+ "id": $!{dataElementGroup.id},
+ "name": "$!encoder.jsEncode( ${dataElementGroup.name} )",
+ "memberCount": "$memberCount"
+ }
+}
=== added file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonIndicatorGroup.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonIndicatorGroup.vm 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonIndicatorGroup.vm 2010-11-20 08:23:34 +0000
@@ -0,0 +1,8 @@
+{ "indicatorGroup":
+ {
+ "id": $!{indicator.id},
+ "name": "$!encoder.jsEncode( ${indicatorGroup.name} )",
+ "alternativeName": "$!encoder.jsEncode( ${indicatorGroup.alternativeNamee} )",
+ "memberCount": "$memberCount"
+ }
+}
=== added file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonIndicatorGroupSet.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonIndicatorGroupSet.vm 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonIndicatorGroupSet.vm 2010-11-20 08:23:34 +0000
@@ -0,0 +1,7 @@
+{ "indicatorGroupSet":
+ {
+ "id": $!{indicatorGroupSet.id},
+ "name": "$!encoder.jsEncode( ${indicatorGroupSet.name} )",
+ "memberCount": "$memberCount"
+ }
+}
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/xmlDataElement.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/xmlDataElement.vm 2010-10-28 09:17:13 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/xmlDataElement.vm 2010-11-20 08:23:34 +0000
@@ -1,13 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<dataElement>
<id>$dataElement.id</id>
- <name>$!encoder.xmlEncode( $dataElement.name )</name>
- <alternativeName>$!encoder.xmlEncode( $dataElement.alternativeName )</alternativeName>
- <shortName>$!encoder.xmlEncode( $dataElement.shortName )</shortName>
- <code>$!encoder.xmlEncode( $dataElement.code )</code>
- <description>$!encoder.xmlEncode( $dataElement.description )</description>
- <active>$dataElement.active</active>
- <type>$!encoder.xmlEncode( $dataElement.type )</type>
- <numberType>$!encoder.xmlEncode( $dataElement.numberType )</numberType>
- <aggregationOperator>$!encoder.xmlEncode( $dataElement.aggregationOperator )</aggregationOperator>
+ <name>$encoder.xmlEncode( $dataElement.name )</name>
+ <shortName>$encoder.xmlEncode( $dataElement.shortName )</shortName>
+ <alternativeName>$!encoder.xmlEncode( $dataElement.alternativeName )</alternativeName>
+ <code>$!encoder.xmlEncode( $dataElement.code )</code>
+ <description>$!encoder.xmlEncode( $dataElement.description )</description>
+ <active>$dataElement.active</active>
+ <domainType>$dataElement.getDomainTypeNullSafe()</domainType>
+ <valueType>$dataElement.type</valueType>
+ <aggregationOperator>$dataElement.aggregationOperator</aggregationOperator>
+ <url>$!encoder.xmlEncode( $dataElement.url )</url>
+ <lastUpdated>$!format.formatDate( $dataElement.lastUpdated )</lastUpdated>
+ <categoryCombo>$!encoder.xmlEncode( $dataElement.categoryCombo.name )</categoryCombo>
</dataElement>
=== added file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/xmlDataElementGroup.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/xmlDataElementGroup.vm 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/xmlDataElementGroup.vm 2010-11-20 08:23:34 +0000
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<dataElementGroup>
+ <id>$dataElementGroup.id</id>
+ <name>$encoder.xmlEncode( $dataElementGroup.name )</name>
+ <memberCount>$memberCount</memberCount>
+</dataElementGroup>
=== added file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/xmlDataElementGroupSet.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/xmlDataElementGroupSet.vm 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/xmlDataElementGroupSet.vm 2010-11-20 08:23:34 +0000
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<dataElementGroupSet>
+ <id>$dataElementGroupSet.id</id>
+ <name>$encoder.xmlEncode( $dataElementGroupSet.name )</name>
+ <memberCount>$dataElementGroupSet.members.size()</memberCount>
+</dataElementGroupSet>
\ No newline at end of file
=== added file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/xmlDataElementGroups.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/xmlDataElementGroups.vm 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/xmlDataElementGroups.vm 2010-11-20 08:23:34 +0000
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<dataElementGroups>
+ #foreach( $dataElementGroup in $dataElementGroups )
+ <dataElementGroup>
+ <id>$dataElementGroup.id</id>
+ <name>$encoder.xmlEncode( $dataElementGroup.name )</name>
+ </dataElementGroup>
+ #end
+</dataElementGroups>
+
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/xmlDataElements.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/xmlDataElements.vm 2010-10-28 09:17:13 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/xmlDataElements.vm 2010-11-20 08:23:34 +0000
@@ -2,14 +2,17 @@
<dataElements>
#foreach( $dataElement in $dataElements )
<dataElement>
- <id>$dataElement.id</id>
- <name>$!encoder.xmlEncode( $dataElement.name )</name>
- <alternativeName>$!encoder.xmlEncode( $dataElement.alternativeName )</alternativeName>
- <shortName>$!encoder.xmlEncode( $dataElement.shortName )</shortName>
- <code>$!encoder.xmlEncode( $dataElement.code )</code>
- <type>$!encoder.xmlEncode( $dataElement.type )</type>
- <numberType>$!encoder.xmlEncode( $dataElement.numberType )</numberType>
- <aggregationOperator>$!encoder.xmlEncode( $dataElement.aggregationOperator )</aggregationOperator>
- </dataElement>
+ <id>$dataElement.id</id>
+ <name>$encoder.xmlEncode( $dataElement.name )</name>
+ <shortName>$encoder.xmlEncode( $dataElement.shortName )</shortName>
+ <alternativeName>$!encoder.xmlEncode( $dataElement.alternativeName )</alternativeName>
+ <code>$!encoder.xmlEncode( $dataElement.code )</code>
+ <description>$!encoder.xmlEncode( $dataElement.description )</description>
+ <active>$dataElement.active</active>
+ <domainType>$dataElement.getDomainTypeNullSafe()</domainType>
+ <type>$dataElement.type</type>
+ <aggregationOperator>$dataElement.aggregationOperator</aggregationOperator>
+ <categoryCombo>$dataElement.categoryCombo</categoryCombo>
+ </dataElement>
#end
-</dataElements>
+</dataElements>
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/xmlDataSet.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/xmlDataSet.vm 2010-01-25 09:23:35 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/xmlDataSet.vm 2010-11-20 08:23:34 +0000
@@ -4,4 +4,7 @@
<name>$!encoder.xmlEncode( $dataSet.name )</name>
<shortName>$!encoder.xmlEncode( $dataSet.shortName )</shortName>
<periodTypeId>$dataSet.periodType.id</periodTypeId>
+ <frequency>$i18n.getString( $dataSet.periodType.name )</frequency>
+ <dataElementCount>$dataSet.dataElements.size()</dataElementCount>
+ <dataentryform>#if( $dataSet.dataEntryForm )$encoder.xmlEncode( $dataSet.dataEntryForm.name )#end</dataentryform>
</dataSet>
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/xmlIndicator.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/xmlIndicator.vm 2010-01-25 09:23:35 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/xmlIndicator.vm 2010-11-20 08:23:34 +0000
@@ -2,16 +2,19 @@
<indicator>
<id>$indicator.id</id>
<name>$!encoder.xmlEncode( $indicator.name )</name>
+ <shortName>$!encoder.xmlEncode( $indicator.shortName )</shortName>
<alternativeName>$!encoder.xmlEncode( $indicator.alternativeName )</alternativeName>
- <shortName>$!encoder.xmlEncode( $indicator.shortName )</shortName>
<code>$!encoder.xmlEncode( $indicator.code )</code>
<description>$!encoder.xmlEncode( $indicator.description )</description>
<annualized>$indicator.annualized</annualized>
<indicatorTypeId>$indicator.indicatorType.id</indicatorTypeId>
+ <indicatorTypeName>$!encoder.xmlEncode( $indicator.indicatorType.name )</indicatorTypeName>
<numerator>$!encoder.xmlEncode( $indicator.numerator )</numerator>
<numeratorDescription>$!encoder.xmlEncode( $indicator.numeratorDescription )</numeratorDescription>
<numeratorAggregationOperator>$!encoder.xmlEncode( $indicator.numeratorAggregationOperator )</numeratorAggregationOperator>
<denominator>$!encoder.xmlEncode( $indicator.denominator )</denominator>
<denominatorDescription>$!encoder.xmlEncode( $indicator.denominatorDescription )</denominatorDescription>
- <denominatorAggregationOperator>$!encoder.xmlEncode( $indicator.denominatorAggregationOperator )</denominatorAggregationOperator>
+ <denominatorAggregationOperator>$!encoder.xmlEncode( $indicator.denominatorAggregationOperator )</denominatorAggregationOperator>
+ <url>$!encoder.xmlEncode( $indicator.url )</url>
+ <lastUpdated>$!format.formatDate( $indicator.lastUpdated )</lastUpdated>
</indicator>
\ No newline at end of file
=== added file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/xmlIndicatorGroup.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/xmlIndicatorGroup.vm 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/xmlIndicatorGroup.vm 2010-11-20 08:23:34 +0000
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<indicator>
+ <id>$indicatorGroup.id</id>
+ <name>$!encoder.xmlEncode( $indicatorGroup.name )</name>
+ <memberCount>$memberCount</memberCount>
+</indicator>
\ No newline at end of file
=== added file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/xmlIndicatorGroupSet.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/xmlIndicatorGroupSet.vm 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/xmlIndicatorGroupSet.vm 2010-11-20 08:23:34 +0000
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<indicatorGroupSet>
+ <id>$indicatorGroupSet.id</id>
+ <name>$encoder.xmlEncode( $indicatorGroupSet.name )</name>
+ <memberCount>$indicatorGroupSet.members.size()</memberCount>
+</indicatorGroupSet>
=== added file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/xmlIndicatorGroups.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/xmlIndicatorGroups.vm 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/xmlIndicatorGroups.vm 2010-11-20 08:23:34 +0000
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<indicatorGroups>
+ #foreach( $indicatorGroup in $indicatorGroups )
+ <indicatorGroup>
+ <id>$indicatorGroup.id</id>
+ <name>$encoder.xmlEncode( $indicatorGroup.name )</name>
+ </indicatorGroup>
+ #end
+</indicatorGroups>
=== added file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetDataElementGroupAction.java'
--- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetDataElementGroupAction.java 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetDataElementGroupAction.java 2010-11-20 08:23:34 +0000
@@ -0,0 +1,90 @@
+package org.hisp.dhis.commons.action;
+
+/*
+ * Copyright (c) 2004-2010, University of Oslo
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * * Neither the name of the HISP project nor the names of its contributors may
+ * be used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+import org.hisp.dhis.dataelement.DataElementGroup;
+import org.hisp.dhis.dataelement.DataElementService;
+
+import com.opensymphony.xwork2.ActionSupport;
+
+/**
+ * @author Torgeir Lorange Ostby
+ * @version $Id: GetDataElementGroupAction.java 2869 2007-02-20 14:26:09Z andegje $
+ */
+public class GetDataElementGroupAction
+ extends ActionSupport
+{
+ // -------------------------------------------------------------------------
+ // Dependencies
+ // -------------------------------------------------------------------------
+
+ private DataElementService dataElementService;
+
+ public void setDataElementService( DataElementService dataElementService )
+ {
+ this.dataElementService = dataElementService;
+ }
+
+ // -------------------------------------------------------------------------
+ // Input/output
+ // -------------------------------------------------------------------------
+
+ private Integer id;
+
+ public void setId( Integer id )
+ {
+ this.id = id;
+ }
+
+ private DataElementGroup dataElementGroup;
+
+ public DataElementGroup getDataElementGroup()
+ {
+ return dataElementGroup;
+ }
+
+ private int memberCount;
+
+ public int getMemberCount()
+ {
+ return memberCount;
+ }
+
+ // -------------------------------------------------------------------------
+ // Action implementation
+ // -------------------------------------------------------------------------
+
+ public String execute()
+ {
+ dataElementGroup = dataElementService.getDataElementGroup( id );
+
+ memberCount = dataElementGroup.getMembers().size();
+
+ return SUCCESS;
+ }
+}
=== added file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetDataElementGroupSetAction.java'
--- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetDataElementGroupSetAction.java 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetDataElementGroupSetAction.java 2010-11-20 08:23:34 +0000
@@ -0,0 +1,79 @@
+package org.hisp.dhis.commons.action;
+/*
+ * Copyright (c) 2004-2010, University of Oslo
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * * Neither the name of the HISP project nor the names of its contributors may
+ * be used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+import org.hisp.dhis.dataelement.DataElementGroupSet;
+import org.hisp.dhis.dataelement.DataElementService;
+
+import com.opensymphony.xwork2.Action;
+
+/**
+ * @author Tran Thanh Tri
+ * @version $Id$
+ */
+public class GetDataElementGroupSetAction
+ implements Action
+{
+ // -------------------------------------------------------------------------
+ // Dependencies
+ // -------------------------------------------------------------------------
+
+ private DataElementService dataElementService;
+
+ public void setDataElementService( DataElementService dataElementService )
+ {
+ this.dataElementService = dataElementService;
+ }
+
+ // -------------------------------------------------------------------------
+ // Input & Output
+ // -------------------------------------------------------------------------
+
+ private Integer id;
+
+ public void setId( Integer id )
+ {
+ this.id = id;
+ }
+
+ private DataElementGroupSet dataElementGroupSet;
+
+ public DataElementGroupSet getDataElementGroupSet()
+ {
+ return dataElementGroupSet;
+ }
+
+ public String execute()
+ throws Exception
+ {
+
+ dataElementGroupSet = dataElementService.getDataElementGroupSet( id );
+
+
+ return SUCCESS;
+ }
+}
\ No newline at end of file
=== added file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetIndicatorGroupAction.java'
--- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetIndicatorGroupAction.java 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetIndicatorGroupAction.java 2010-11-20 08:23:34 +0000
@@ -0,0 +1,90 @@
+package org.hisp.dhis.commons.action;
+
+/*
+ * Copyright (c) 2004-2010, University of Oslo
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * * Neither the name of the HISP project nor the names of its contributors may
+ * be used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+import org.hisp.dhis.indicator.IndicatorGroup;
+import org.hisp.dhis.indicator.IndicatorService;
+
+import com.opensymphony.xwork2.ActionSupport;
+
+/**
+ * @author Torgeir Lorange Ostby
+ * @version $Id: GetIndicatorGroupAction.java 3305 2007-05-14 18:55:52Z larshelg $
+ */
+public class GetIndicatorGroupAction
+ extends ActionSupport
+{
+ // -------------------------------------------------------------------------
+ // Dependencies
+ // -------------------------------------------------------------------------
+
+ private IndicatorService indicatorService;
+
+ public void setIndicatorService( IndicatorService indicatorService )
+ {
+ this.indicatorService = indicatorService;
+ }
+
+ // -------------------------------------------------------------------------
+ // Input/output
+ // -------------------------------------------------------------------------
+
+ private Integer id;
+
+ public void setId( Integer id )
+ {
+ this.id = id;
+ }
+
+ private IndicatorGroup indicatorGroup;
+
+ public IndicatorGroup getIndicatorGroup()
+ {
+ return indicatorGroup;
+ }
+
+ private int memberCount;
+
+ public int getMemberCount()
+ {
+ return memberCount;
+ }
+
+ // -------------------------------------------------------------------------
+ // Action implementation
+ // -------------------------------------------------------------------------
+
+ public String execute()
+ {
+ indicatorGroup = indicatorService.getIndicatorGroup( id );
+
+ memberCount = indicatorGroup.getMembers().size();
+
+ return SUCCESS;
+ }
+}
=== added file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetIndicatorGroupSetAction.java'
--- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetIndicatorGroupSetAction.java 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetIndicatorGroupSetAction.java 2010-11-20 08:23:34 +0000
@@ -0,0 +1,79 @@
+package org.hisp.dhis.commons.action;
+/*
+ * Copyright (c) 2004-2010, University of Oslo
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * * Neither the name of the HISP project nor the names of its contributors may
+ * be used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+import org.hisp.dhis.indicator.IndicatorGroupSet;
+import org.hisp.dhis.indicator.IndicatorService;
+
+import com.opensymphony.xwork2.Action;
+
+/**
+ * @author Tran Thanh Tri
+ * @version $Id$
+ */
+public class GetIndicatorGroupSetAction
+ implements Action
+{
+
+ // -------------------------------------------------------------------------
+ // Dependencies
+ // -------------------------------------------------------------------------
+
+ private IndicatorService indicatorService;
+
+ public void setIndicatorService( IndicatorService indicatorService )
+ {
+ this.indicatorService = indicatorService;
+ }
+
+ // -------------------------------------------------------------------------
+ // Input & Output
+ // -------------------------------------------------------------------------
+
+ private Integer id;
+
+ public void setId( Integer id )
+ {
+ this.id = id;
+ }
+
+ private IndicatorGroupSet indicatorGroupSet;
+
+ public IndicatorGroupSet getIndicatorGroupSet()
+ {
+ return indicatorGroupSet;
+ }
+
+ @Override
+ public String execute()
+ throws Exception
+ {
+ indicatorGroupSet = indicatorService.getIndicatorGroupSet( id );
+
+ return SUCCESS;
+ }
+}
=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-web/dhis-web-commons/src/main/resources/META-INF/dhis/beans.xml 2010-11-11 17:36:25 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/resources/META-INF/dhis/beans.xml 2010-11-20 08:23:34 +0000
@@ -599,16 +599,41 @@
<!-- Common actions -->
+ <bean id="org.hisp.dhis.commons.action.GetAvailablePeriodsAction"
+ class="org.hisp.dhis.commons.action.GetAvailablePeriodsAction" scope="prototype">
+ </bean>
+
+ <bean id="org.hisp.dhis.commons.action.GetCategoryOptionCombosAction"
+ class="org.hisp.dhis.commons.action.GetCategoryOptionCombosAction" scope="prototype">
+ <property name="dataElementService" ref="org.hisp.dhis.dataelement.DataElementService"/>
+ </bean>
+
<bean id="org.hisp.dhis.commons.action.GetDataElementAction"
class="org.hisp.dhis.commons.action.GetDataElementAction" scope="prototype">
<property name="dataElementService" ref="org.hisp.dhis.dataelement.DataElementService" />
</bean>
+ <bean id="org.hisp.dhis.commons.action.GetDataElementGroupAction"
+ class="org.hisp.dhis.commons.action.GetDataElementGroupAction" scope="prototype">
+ <property name="dataElementService" ref="org.hisp.dhis.dataelement.DataElementService" />
+ </bean>
+
<bean id="org.hisp.dhis.commons.action.GetDataElementGroupsAction"
class="org.hisp.dhis.commons.action.GetDataElementGroupsAction" scope="prototype">
<property name="dataElementService" ref="org.hisp.dhis.dataelement.DataElementService" />
</bean>
+ <bean id="org.hisp.dhis.commons.action.GetDataElementGroupSetAction"
+ class="org.hisp.dhis.commons.action.GetDataElementGroupSetAction" scope="prototype">
+ <property name="dataElementService" ref="org.hisp.dhis.dataelement.DataElementService" />
+ </bean>
+
+ <bean id="org.hisp.dhis.commons.action.GetDataElementNameAction"
+ class="org.hisp.dhis.commons.action.GetDataElementNameAction" scope="prototype">
+ <property name="dataElementService" ref="org.hisp.dhis.dataelement.DataElementService"/>
+ <property name="categoryService" ref="org.hisp.dhis.dataelement.DataElementCategoryService"/>
+ </bean>
+
<bean id="org.hisp.dhis.commons.action.GetDataElementsAction"
class="org.hisp.dhis.commons.action.GetDataElementsAction" scope="prototype">
<property name="dataElementService" ref="org.hisp.dhis.dataelement.DataElementService" />
@@ -621,119 +646,98 @@
class="org.hisp.dhis.commons.action.GetDataSetAction" scope="prototype">
<property name="dataSetService" ref="org.hisp.dhis.dataset.DataSetService" />
</bean>
-
<bean id="org.hisp.dhis.commons.action.GetDataSetsAction"
- class="org.hisp.dhis.commons.action.GetDataSetsAction"
- scope="prototype">
+ class="org.hisp.dhis.commons.action.GetDataSetsAction" scope="prototype">
<property name="dataSetService" ref="org.hisp.dhis.dataset.DataSetService" />
<property name="periodService" ref="org.hisp.dhis.period.PeriodService" />
<property name="currentUserService" ref="org.hisp.dhis.user.CurrentUserService" />
<property name="userStore" ref="org.hisp.dhis.user.UserStore" />
</bean>
+ <bean id="org.hisp.dhis.commons.action.GetExpressionTextAction"
+ class="org.hisp.dhis.commons.action.GetExpressionTextAction" scope="prototype">
+ <property name="expressionService" ref="org.hisp.dhis.expression.ExpressionService"/>
+ </bean>
+
<bean id="org.hisp.dhis.commons.action.GetIndicatorAction"
- class="org.hisp.dhis.commons.action.GetIndicatorAction"
- scope="prototype">
+ class="org.hisp.dhis.commons.action.GetIndicatorAction" scope="prototype">
+ <property name="indicatorService" ref="org.hisp.dhis.indicator.IndicatorService" />
+ </bean>
+
+ <bean id="org.hisp.dhis.commons.action.GetIndicatorGroupAction"
+ class="org.hisp.dhis.commons.action.GetIndicatorGroupAction" scope="prototype">
<property name="indicatorService" ref="org.hisp.dhis.indicator.IndicatorService" />
</bean>
<bean id="org.hisp.dhis.commons.action.GetIndicatorGroupsAction"
- class="org.hisp.dhis.commons.action.GetIndicatorGroupsAction"
- scope="prototype">
+ class="org.hisp.dhis.commons.action.GetIndicatorGroupsAction" scope="prototype">
+ <property name="indicatorService" ref="org.hisp.dhis.indicator.IndicatorService" />
+ </bean>
+
+ <bean id="org.hisp.dhis.commons.action.GetIndicatorGroupSetAction"
+ class="org.hisp.dhis.commons.action.GetIndicatorGroupSetAction" scope="prototype">
<property name="indicatorService" ref="org.hisp.dhis.indicator.IndicatorService" />
</bean>
<bean id="org.hisp.dhis.commons.action.GetIndicatorsAction"
- class="org.hisp.dhis.commons.action.GetIndicatorsAction"
- scope="prototype">
+ class="org.hisp.dhis.commons.action.GetIndicatorsAction" scope="prototype">
<property name="indicatorService" ref="org.hisp.dhis.indicator.IndicatorService" />
</bean>
+ <bean id="org.hisp.dhis.commons.action.GetOperandsAction"
+ class="org.hisp.dhis.commons.action.GetOperandsAction"
+ scope="prototype">
+ <property name="dataElementService" ref="org.hisp.dhis.dataelement.DataElementService"/>
+ <property name="dataElementCategoryService" ref="org.hisp.dhis.dataelement.DataElementCategoryService"/>
+ </bean>
+
<bean id="org.hisp.dhis.commons.action.GetOrganisationUnitAction"
class="org.hisp.dhis.commons.action.GetOrganisationUnitAction" scope="prototype">
<property name="organisationUnitService"
ref="org.hisp.dhis.organisationunit.OrganisationUnitService" />
</bean>
+ <bean id="org.hisp.dhis.commons.action.GetOrganisationUnitChildrenAction"
+ class="org.hisp.dhis.commons.action.GetOrganisationUnitChildrenAction" scope="prototype">
+ <property name="organisationUnitService"
+ ref="org.hisp.dhis.organisationunit.OrganisationUnitService" />
+ </bean>
+
+ <bean id="org.hisp.dhis.commons.action.GetOrganisationUnitGroupsAction"
+ class="org.hisp.dhis.commons.action.GetOrganisationUnitGroupsAction" scope="prototype">
+ <property name="organisationUnitGroupService">
+ <ref bean="org.hisp.dhis.organisationunit.OrganisationUnitGroupService" />
+ </property>
+ </bean>
+
+ <bean id="org.hisp.dhis.commons.action.GetOrganisationUnitLevelsAction"
+ class="org.hisp.dhis.commons.action.GetOrganisationUnitLevelsAction" scope="prototype">
+ <property name="organisationUnitService"
+ ref="org.hisp.dhis.organisationunit.OrganisationUnitService" />
+ </bean>
+
<bean id="org.hisp.dhis.commons.action.GetOrganisationUnitsAction"
class="org.hisp.dhis.commons.action.GetOrganisationUnitsAction" scope="prototype">
<property name="organisationUnitService"
ref="org.hisp.dhis.organisationunit.OrganisationUnitService" />
</bean>
- <bean id="org.hisp.dhis.commons.action.GetOrganisationUnitChildrenAction"
- class="org.hisp.dhis.commons.action.GetOrganisationUnitChildrenAction"
- scope="prototype">
- <property name="organisationUnitService"
- ref="org.hisp.dhis.organisationunit.OrganisationUnitService" />
- </bean>
-
<bean id="org.hisp.dhis.commons.action.GetPeriodAction"
- class="org.hisp.dhis.commons.action.GetPeriodAction"
- scope="prototype">
+ class="org.hisp.dhis.commons.action.GetPeriodAction" scope="prototype">
<property name="periodService" ref="org.hisp.dhis.period.PeriodService" />
</bean>
<bean id="org.hisp.dhis.commons.action.GetPeriodsAction"
- class="org.hisp.dhis.commons.action.GetPeriodsAction"
- scope="prototype">
+ class="org.hisp.dhis.commons.action.GetPeriodsAction" scope="prototype">
<property name="periodService" ref="org.hisp.dhis.period.PeriodService" />
</bean>
<bean id="org.hisp.dhis.commons.action.GetPeriodTypesAction"
- class="org.hisp.dhis.commons.action.GetPeriodTypesAction"
- scope="prototype">
+ class="org.hisp.dhis.commons.action.GetPeriodTypesAction" scope="prototype">
<property name="periodService" ref="org.hisp.dhis.period.PeriodService" />
</bean>
- <bean id="org.hisp.dhis.commons.action.GetCategoryOptionCombosAction"
- class="org.hisp.dhis.commons.action.GetCategoryOptionCombosAction"
- scope="prototype">
- <property name="dataElementService" ref="org.hisp.dhis.dataelement.DataElementService"/>
- </bean>
-
- <bean id="org.hisp.dhis.commons.action.GetDataElementNameAction"
- class="org.hisp.dhis.commons.action.GetDataElementNameAction"
- scope="prototype">
- <property name="dataElementService" ref="org.hisp.dhis.dataelement.DataElementService"/>
- <property name="categoryService" ref="org.hisp.dhis.dataelement.DataElementCategoryService"/>
- </bean>
-
- <bean id="org.hisp.dhis.commons.action.GetOperandsAction"
- class="org.hisp.dhis.commons.action.GetOperandsAction"
- scope="prototype">
- <property name="dataElementService" ref="org.hisp.dhis.dataelement.DataElementService"/>
- <property name="dataElementCategoryService" ref="org.hisp.dhis.dataelement.DataElementCategoryService"/>
- </bean>
-
- <bean id="org.hisp.dhis.commons.action.GetAvailablePeriodsAction"
- class="org.hisp.dhis.commons.action.GetAvailablePeriodsAction"
- scope="prototype">
- </bean>
-
- <bean id="org.hisp.dhis.commons.action.GetExpressionTextAction"
- class="org.hisp.dhis.commons.action.GetExpressionTextAction"
- scope="prototype">
- <property name="expressionService" ref="org.hisp.dhis.expression.ExpressionService"/>
- </bean>
-
- <bean id="org.hisp.dhis.commons.action.GetOrganisationUnitLevelsAction"
- class="org.hisp.dhis.commons.action.GetOrganisationUnitLevelsAction"
- scope="prototype">
- <property name="organisationUnitService"
- ref="org.hisp.dhis.organisationunit.OrganisationUnitService" />
- </bean>
-
- <bean id="org.hisp.dhis.commons.action.GetOrganisationUnitGroupsAction"
- class="org.hisp.dhis.commons.action.GetOrganisationUnitGroupsAction"
- scope="prototype">
- <property name="organisationUnitGroupService">
- <ref bean="org.hisp.dhis.organisationunit.OrganisationUnitGroupService" />
- </property>
- </bean>
-
-
<bean id="org.hisp.dhis.commons.action.NoAction"
class="org.hisp.dhis.commons.action.NoAction" />
=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/resources/dhis-web-commons.xml'
--- dhis-2/dhis-web/dhis-web-commons/src/main/resources/dhis-web-commons.xml 2010-09-14 09:03:41 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/resources/dhis-web-commons.xml 2010-11-20 08:23:34 +0000
@@ -309,6 +309,13 @@
<package name="dhis-web-commons-ajax" extends="dhis-web-commons"
namespace="/dhis-web-commons-ajax">
+ <action name="getCategoryOptionCombos"
+ class="org.hisp.dhis.commons.action.GetCategoryOptionCombosAction">
+ <result name="success" type="velocity-xml">
+ /dhis-web-commons/ajax/xmlCategoryOptionCombos.vm</result>
+ <param name="onExceptionReturn">plainTextError</param>
+ </action>
+
<action name="getDataElement"
class="org.hisp.dhis.commons.action.GetDataElementAction">
<result name="success" type="velocity-xml">
@@ -316,6 +323,27 @@
<param name="onExceptionReturn">plainTextError</param>
</action>
+ <action name="getDataElementGroup"
+ class="org.hisp.dhis.commons.action.GetDataElementGroupAction">
+ <result name="success" type="velocity-xml">
+ /dhis-web-commons/ajax/xmlDataElementGroup.vm</result>
+ <param name="onExceptionReturn">plainTextError</param>
+ </action>
+
+ <action name="getDataElementGroups"
+ class="org.hisp.dhis.commons.action.GetDataElementGroupsAction">
+ <result name="success" type="velocity-json">
+ /dhis-web-commons/ajax/xmlDataElementGroups.vm</result>
+ <param name="onExceptionReturn">plainTextError</param>
+ </action>
+
+ <action name="getDataElementGroupSet"
+ class="org.hisp.dhis.commons.action.GetDataElementGroupSetAction">
+ <result name="success" type="velocity-json">
+ /dhis-web-commons/ajax/xmlDataElementGroupSet.vm</result>
+ <param name="onExceptionReturn">plainTextError</param>
+ </action>
+
<action name="getDataElements"
class="org.hisp.dhis.commons.action.GetDataElementsAction">
<result name="success" type="velocity-xml">
@@ -341,12 +369,36 @@
<param name="onExceptionReturn">plainTextError</param>
</action>
+ <action name="getIndicatorGroup" class="org.hisp.dhis.commons.action.GetIndicatorGroupAction">
+ <result name="success" type="velocity-xml">
+ /dhis-web-commons/ajax/xmlIndicatorGroup.vm</result>
+ <param name="onExceptionReturn">plainTextError</param>
+ </action>
+
+ <action name="getIndicatorGroups" class="org.hisp.dhis.commons.action.GetIndicatorGroupsAction">
+ <result name="success" type="velocity-xml">
+ /dhis-web-commons/ajax/xmlIndicatorGroups.vm</result>
+ <param name="onExceptionReturn">plainTextError</param>
+ </action>
+
+ <action name="getIndicatorGroupSet" class="org.hisp.dhis.commons.action.GetIndicatorGroupSetAction">
+ <result name="success" type="velocity-xml">
+ /dhis-web-commons/ajax/xmlIndicatorGroupSet.vm</result>
+ <param name="onExceptionReturn">plainTextError</param>
+ </action>
+
<action name="getIndicators" class="org.hisp.dhis.commons.action.GetIndicatorsAction">
<result name="success" type="velocity-xml">
/dhis-web-commons/ajax/xmlIndicators.vm</result>
<param name="onExceptionReturn">plainTextError</param>
</action>
+ <action name="getOperands" class="org.hisp.dhis.commons.action.GetOperandsAction">
+ <result name="success" type="velocity-xml">
+ /dhis-web-commons/ajax/xmlOperands.vm</result>
+ <param name="onExceptionReturn">plainTextError</param>
+ </action>
+
<action name="getOrganisationUnit"
class="org.hisp.dhis.commons.action.GetOrganisationUnitAction">
<result name="success" type="velocity-xml">
@@ -379,20 +431,7 @@
/dhis-web-commons/ajax/xmlPeriods.vm</result>
<param name="onExceptionReturn">plainTextError</param>
</action>
-
- <action name="getCategoryOptionCombos"
- class="org.hisp.dhis.commons.action.GetCategoryOptionCombosAction">
- <result name="success" type="velocity-xml">
- /dhis-web-commons/ajax/xmlCategoryOptionCombos.vm</result>
- <param name="onExceptionReturn">plainTextError</param>
- </action>
-
- <action name="getOperands" class="org.hisp.dhis.commons.action.GetOperandsAction">
- <result name="success" type="velocity-xml">
- /dhis-web-commons/ajax/xmlOperands.vm</result>
- <param name="onExceptionReturn">plainTextError</param>
- </action>
-
+
</package>
<!-- Common actions JSON -->
@@ -400,6 +439,27 @@
<package name="dhis-web-commons-ajax-json" extends="dhis-web-commons"
namespace="/dhis-web-commons-ajax-json">
+ <action name="getCategoryOptionCombos"
+ class="org.hisp.dhis.commons.action.GetCategoryOptionCombosAction">
+ <result name="success" type="velocity-json">
+ /dhis-web-commons/ajax/jsonCategoryOptionCombos.vm</result>
+ <param name="onExceptionReturn">plainTextError</param>
+ </action>
+
+ <action name="getDataElement"
+ class="org.hisp.dhis.commons.action.GetDataElementAction">
+ <result name="success" type="velocity-json">
+ /dhis-web-commons/ajax/jsonDataElement.vm</result>
+ <param name="onExceptionReturn">plainTextError</param>
+ </action>
+
+ <action name="getDataElementGroup"
+ class="org.hisp.dhis.commons.action.GetDataElementGroupAction">
+ <result name="success" type="velocity-xml">
+ /dhis-web-commons/ajax/jsonDataElementGroup.vm</result>
+ <param name="onExceptionReturn">plainTextError</param>
+ </action>
+
<action name="getDataElementGroups"
class="org.hisp.dhis.commons.action.GetDataElementGroupsAction">
<result name="success" type="velocity-json">
@@ -407,10 +467,10 @@
<param name="onExceptionReturn">plainTextError</param>
</action>
- <action name="getDataElement"
- class="org.hisp.dhis.commons.action.GetDataElementAction">
+ <action name="getDataElementName"
+ class="org.hisp.dhis.commons.action.GetDataElementNameAction">
<result name="success" type="velocity-json">
- /dhis-web-commons/ajax/jsonDataElement.vm</result>
+ /dhis-web-commons/ajax/jsonDataElementName.vm</result>
<param name="onExceptionReturn">plainTextError</param>
</action>
@@ -433,6 +493,19 @@
<param name="onExceptionReturn">plainTextError</param>
</action>
+ <action name="getIndicator" class="org.hisp.dhis.commons.action.GetIndicatorAction">
+ <result name="success" type="velocity-json">
+ /dhis-web-commons/ajax/jsonIndicator.vm</result>
+ <param name="onExceptionReturn">plainTextError</param>
+ </action>
+
+ <action name="getIndicatorGroup"
+ class="org.hisp.dhis.commons.action.GetIndicatorGroupAction">
+ <result name="success" type="velocity-json">
+ /dhis-web-commons/ajax/jsonIndicatorGroup.vm</result>
+ <param name="onExceptionReturn">plainTextError</param>
+ </action>
+
<action name="getIndicatorGroups"
class="org.hisp.dhis.commons.action.GetIndicatorGroupsAction">
<result name="success" type="velocity-json">
@@ -440,9 +513,10 @@
<param name="onExceptionReturn">plainTextError</param>
</action>
- <action name="getIndicator" class="org.hisp.dhis.commons.action.GetIndicatorAction">
+ <action name="getIndicatorGroupSet"
+ class="org.hisp.dhis.commons.action.GetIndicatorGroupSetAction">
<result name="success" type="velocity-json">
- /dhis-web-commons/ajax/jsonIndicator.vm</result>
+ /dhis-web-commons/ajax/jsonIndicatorGroupSet.vm</result>
<param name="onExceptionReturn">plainTextError</param>
</action>
@@ -452,6 +526,12 @@
<param name="onExceptionReturn">plainTextError</param>
</action>
+ <action name="getOperands" class="org.hisp.dhis.commons.action.GetOperandsAction">
+ <result name="success" type="velocity-json">
+ /dhis-web-commons/ajax/jsonOperands.vm</result>
+ <param name="onExceptionReturn">plainTextError</param>
+ </action>
+
<action name="getOrganisationUnit"
class="org.hisp.dhis.commons.action.GetOrganisationUnitAction">
<result name="success" type="velocity-json">
@@ -459,20 +539,34 @@
<param name="onExceptionReturn">plainTextError</param>
</action>
+ <action name="getOrganisationUnitGroups"
+ class="org.hisp.dhis.commons.action.GetOrganisationUnitGroupsAction">
+ <result name="success" type="velocity-json">
+ /dhis-web-commons/ajax/jsonOrganisationUnitGroups.vm</result>
+ <param name="onExceptionReturn">plainTextError</param>
+ </action>
+
+ <action name="getOrganisationUnitChildren"
+ class="org.hisp.dhis.commons.action.GetOrganisationUnitChildrenAction">
+ <result name="success" type="velocity-json">
+ /dhis-web-commons/ajax/jsonOrganisationUnits.vm</result>
+ <param name="onExceptionReturn">plainTextError</param>
+ </action>
+
+ <action name="getOrganisationUnitLevels"
+ class="org.hisp.dhis.commons.action.GetOrganisationUnitLevelsAction">
+ <result name="success" type="velocity-json">
+ /dhis-web-commons/ajax/jsonOrganisationUnitLevels.vm</result>
+ <param name="onExceptionReturn">plainTextError</param>
+ </action>
+
<action name="getOrganisationUnits"
class="org.hisp.dhis.commons.action.GetOrganisationUnitsAction">
<result name="success" type="velocity-json">
/dhis-web-commons/ajax/jsonOrganisationUnits.vm</result>
<param name="onExceptionReturn">plainTextError</param>
</action>
-
- <action name="getOrganisationUnitChildren"
- class="org.hisp.dhis.commons.action.GetOrganisationUnitChildrenAction">
- <result name="success" type="velocity-json">
- /dhis-web-commons/ajax/jsonOrganisationUnits.vm</result>
- <param name="onExceptionReturn">plainTextError</param>
- </action>
-
+
<action name="getPeriod" class="org.hisp.dhis.commons.action.GetPeriodAction">
<result name="success" type="velocity-json">
/dhis-web-commons/ajax/jsonPeriod.vm</result>
@@ -485,26 +579,6 @@
<param name="onExceptionReturn">plainTextError</param>
</action>
- <action name="getCategoryOptionCombos"
- class="org.hisp.dhis.commons.action.GetCategoryOptionCombosAction">
- <result name="success" type="velocity-json">
- /dhis-web-commons/ajax/jsonCategoryOptionCombos.vm</result>
- <param name="onExceptionReturn">plainTextError</param>
- </action>
-
- <action name="getDataElementName"
- class="org.hisp.dhis.commons.action.GetDataElementNameAction">
- <result name="success" type="velocity-json">
- /dhis-web-commons/ajax/jsonDataElementName.vm</result>
- <param name="onExceptionReturn">plainTextError</param>
- </action>
-
- <action name="getOperands" class="org.hisp.dhis.commons.action.GetOperandsAction">
- <result name="success" type="velocity-json">
- /dhis-web-commons/ajax/jsonOperands.vm</result>
- <param name="onExceptionReturn">plainTextError</param>
- </action>
-
<action name="getAvailablePeriods"
class="org.hisp.dhis.commons.action.GetAvailablePeriodsAction">
<result name="success" type="velocity-json">
@@ -521,21 +595,6 @@
<param name="onExceptionReturn">plainTextError</param>
</action>
- <action name="getOrganisationUnitLevels"
- class="org.hisp.dhis.commons.action.GetOrganisationUnitLevelsAction">
- <result name="success" type="velocity-json">
- /dhis-web-commons/ajax/jsonOrganisationUnitLevels.vm</result>
- <param name="onExceptionReturn">plainTextError</param>
- </action>
-
- <action name="getOrganisationUnitGroups"
- class="org.hisp.dhis.commons.action.GetOrganisationUnitGroupsAction">
- <result name="success" type="velocity-json">
- /dhis-web-commons/ajax/jsonOrganisationUnitGroups.vm</result>
- <param name="onExceptionReturn">plainTextError</param>
- </action>
-
-
</package>
<!-- About -->
=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/resources/i18n_global.properties'
--- dhis-2/dhis-web/dhis-web-commons/src/main/resources/i18n_global.properties 2010-11-09 07:42:19 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/resources/i18n_global.properties 2010-11-20 08:23:34 +0000
@@ -422,7 +422,7 @@
expression = Expression
left_expression = Left Expression
right_expression = Right Expression
-indicator_type = Indicator type
+indicator_type = Indicator Type
annualized = Annualized
aggregation_operator = Aggregation operator
numerator = Numerator
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/struts.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/struts.xml 2010-11-02 13:02:10 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/struts.xml 2010-11-20 08:23:34 +0000
@@ -44,13 +44,6 @@
</result>
</action>
- <action name="getDataElement"
- class="org.hisp.dhis.dd.action.dataelement.GetDataElementAction">
- <result name="success" type="velocity-xml">
- /dhis-web-maintenance-datadictionary/responseDataElement.vm</result>
- <param name="onExceptionReturn">plainTextError</param>
- </action>
-
<action name="getDataElements"
class="org.hisp.dhis.dd.action.dataelement.GetDataElementListAction">
<result name="success" type="velocity-xml">
@@ -113,8 +106,7 @@
<result name="error" type="velocity-json">../dhis-web-commons/ajax/jsonResponseError.vm
</result>
<param name="onExceptionReturn">plainTextError</param>
- </action>
-
+ </action>
<!-- DataElementGroup Editor -->
@@ -211,14 +203,6 @@
class="org.hisp.dhis.dd.action.dataelementgroup.GetDataElementGroupListAction" method="searchByName">
<result name="success" type="velocity">
/dhis-web-maintenance-datadictionary/dataElementGroupSearch.vm</result>
-
- </action>
-
- <action name="getDataElementGroup"
- class="org.hisp.dhis.dd.action.dataelementgroup.GetDataElementGroupAction">
- <result name="success" type="velocity-xml">
- /dhis-web-maintenance-datadictionary/responseDataElementGroup.vm
- </result>
</action>
<action name="removeDataElementGroup"
@@ -338,12 +322,83 @@
<param name="requiredAuthorities">F_DATAELEMENTGROUPSET_DELETE</param>
</action>
- <action name="showDataElementGroupSetDetails"
- class="org.hisp.dhis.dd.action.dataelementgroupset.GetDataElementGroupSetAction">
- <result name="success" type="velocity-xml">
- /dhis-web-maintenance-datadictionary/responseDataElementGroupSet.vm
- </result>
- </action>
+ <!-- Indicator -->
+
+ <action name="indicator"
+ class="org.hisp.dhis.dd.action.indicator.GetIndicatorListAction">
+ <result name="success" type="velocity">/main.vm</result>
+ <param name="page">/dhis-web-maintenance-datadictionary/indicator.vm</param>
+ <param name="menu">/dhis-web-maintenance-datadictionary/menu.vm</param>
+ <param name="javascripts">javascript/indicator.js,javascript/dataDictionary.js,javascript/denum.js</param>
+ </action>
+
+ <action name="showSortIndicatorForm"
+ class="org.hisp.dhis.dd.action.indicator.GetIndicatorListSortOrderAction">
+ <result name="success" type="velocity">/main.vm</result>
+ <param name="page">/dhis-web-maintenance-datadictionary/sortIndicatorForm.vm</param>
+ </action>
+
+ <action name="saveIndicatorSortOrder"
+ class="org.hisp.dhis.dd.action.indicator.SaveIndicatorSortOrderAction">
+ <result name="success" type="redirect">indicator.action
+ </result>
+ </action>
+
+ <action name="removeIndicator"
+ class="org.hisp.dhis.dd.action.indicator.RemoveIndicatorAction">
+ <result name="success" type="velocity-json">
+ /dhis-web-commons/ajax/jsonResponseSuccess.vm</result>
+ <result name="error" type="velocity-json">
+ /dhis-web-commons/ajax/jsonResponseError.vm</result>
+ <param name="onExceptionReturn">plainTextError</param>
+ <param name="requiredAuthorities">F_INDICATOR_DELETE</param>
+ </action>
+
+ <action name="showAddIndicatorForm"
+ class="org.hisp.dhis.dd.action.indicatortype.GetIndicatorTypeListAction">
+ <result name="success" type="velocity">/main.vm</result>
+ <param name="page">/dhis-web-maintenance-datadictionary/addIndicatorForm.vm</param>
+ <param name="javascripts">javascript/shortName.js,javascript/indicator.js,javascript/denum.js</param>
+ <param name="requiredAuthorities">F_INDICATOR_ADD</param>
+ </action>
+
+ <action name="addIndicator"
+ class="org.hisp.dhis.dd.action.indicator.AddIndicatorAction">
+ <result name="success" type="redirect">indicator.action
+ </result>
+ <param name="requiredAuthorities">F_INDICATOR_ADD</param>
+ </action>
+
+ <action name="showUpdateIndicatorForm"
+ class="org.hisp.dhis.dd.action.indicator.GetIndicatorAction">
+ <result name="success" type="chain">getIndicatorTypeList
+ </result>
+ <param name="requiredAuthorities">F_INDICATOR_UPDATE</param>
+ </action>
+
+ <action name="getIndicatorTypeList"
+ class="org.hisp.dhis.dd.action.indicatortype.GetIndicatorTypeListAction">
+ <result name="success" type="velocity">/main.vm</result>
+ <param name="page">/dhis-web-maintenance-datadictionary/updateIndicatorForm.vm</param>
+ <param name="javascripts">javascript/shortName.js,javascript/indicator.js,javascript/denum.js</param>
+ <param name="requiredAuthorities">F_INDICATOR_UPDATE</param>
+ </action>
+
+ <action name="updateIndicator"
+ class="org.hisp.dhis.dd.action.indicator.UpdateIndicatorAction">
+ <result name="success" type="redirect">indicator.action
+ </result>
+ <param name="requiredAuthorities">F_INDICATOR_UPDATE</param>
+ </action>
+
+ <action name="validateIndicator"
+ class="org.hisp.dhis.dd.action.indicator.ValidateIndicatorAction">
+ <result name="success" type="velocity-json">
+ /dhis-web-commons/ajax/jsonResponseSuccess.vm</result>
+ <result name="error" type="velocity-json">
+ /dhis-web-commons/ajax/jsonResponseError.vm</result>
+ <param name="onExceptionReturn">plainTextError</param>
+ </action>
<!-- Indicator Group Editor -->
@@ -438,14 +493,6 @@
<param name="javascripts">javascript/indicatorGroup.js</param>
</action>
- <action name="getIndicatorGroup"
- class="org.hisp.dhis.dd.action.indicatorgroup.GetIndicatorGroupAction">
- <result name="success" type="velocity-xml">
- /dhis-web-maintenance-datadictionary/responseIndicatorGroup.vm
- </result>
- <param name="onExceptionReturn">plainTextError</param>
- </action>
-
<action name="removeIndicatorGroup"
class="org.hisp.dhis.dd.action.indicatorgroup.RemoveIndicatorGroupAction">
<result name="success" type="velocity-json">
@@ -562,14 +609,6 @@
<param name="requiredAuthorities">F_INDICATORGROUPSET_DELETE</param>
</action>
- <action name="showIndicatorGroupSetDetails"
- class="org.hisp.dhis.dd.action.indicatorgroupset.GetIndicatorGroupSetAction">
- <result name="success" type="velocity-xml">
- /dhis-web-maintenance-datadictionary/responseIndicatorGroupSet.vm
- </result>
- </action>
-
-
<!-- IndicatorType -->
<action name="indicatorType"
@@ -635,91 +674,6 @@
<param name="onExceptionReturn">plainTextError</param>
</action>
- <!-- Indicator -->
-
- <action name="indicator"
- class="org.hisp.dhis.dd.action.indicator.GetIndicatorListAction">
- <result name="success" type="velocity">/main.vm</result>
- <param name="page">/dhis-web-maintenance-datadictionary/indicator.vm</param>
- <param name="menu">/dhis-web-maintenance-datadictionary/menu.vm</param>
- <param name="javascripts">javascript/indicator.js,javascript/dataDictionary.js,javascript/denum.js</param>
- </action>
-
- <action name="showSortIndicatorForm"
- class="org.hisp.dhis.dd.action.indicator.GetIndicatorListSortOrderAction">
- <result name="success" type="velocity">/main.vm</result>
- <param name="page">/dhis-web-maintenance-datadictionary/sortIndicatorForm.vm</param>
- </action>
-
- <action name="saveIndicatorSortOrder"
- class="org.hisp.dhis.dd.action.indicator.SaveIndicatorSortOrderAction">
- <result name="success" type="redirect">indicator.action
- </result>
- </action>
-
- <action name="getIndicator"
- class="org.hisp.dhis.dd.action.indicator.GetIndicatorAction">
- <result name="success" type="velocity-xml">
- /dhis-web-maintenance-datadictionary/responseIndicator.vm</result>
- <param name="onExceptionReturn">plainTextError</param>
- </action>
-
- <action name="removeIndicator"
- class="org.hisp.dhis.dd.action.indicator.RemoveIndicatorAction">
- <result name="success" type="velocity-json">
- /dhis-web-commons/ajax/jsonResponseSuccess.vm</result>
- <result name="error" type="velocity-json">
- /dhis-web-commons/ajax/jsonResponseError.vm</result>
- <param name="onExceptionReturn">plainTextError</param>
- <param name="requiredAuthorities">F_INDICATOR_DELETE</param>
- </action>
-
- <action name="showAddIndicatorForm"
- class="org.hisp.dhis.dd.action.indicatortype.GetIndicatorTypeListAction">
- <result name="success" type="velocity">/main.vm</result>
- <param name="page">/dhis-web-maintenance-datadictionary/addIndicatorForm.vm</param>
- <param name="javascripts">javascript/shortName.js,javascript/indicator.js,javascript/denum.js</param>
- <param name="requiredAuthorities">F_INDICATOR_ADD</param>
- </action>
-
- <action name="addIndicator"
- class="org.hisp.dhis.dd.action.indicator.AddIndicatorAction">
- <result name="success" type="redirect">indicator.action
- </result>
- <param name="requiredAuthorities">F_INDICATOR_ADD</param>
- </action>
-
- <action name="showUpdateIndicatorForm"
- class="org.hisp.dhis.dd.action.indicator.GetIndicatorAction">
- <result name="success" type="chain">getIndicatorTypeList
- </result>
- <param name="requiredAuthorities">F_INDICATOR_UPDATE</param>
- </action>
-
- <action name="getIndicatorTypeList"
- class="org.hisp.dhis.dd.action.indicatortype.GetIndicatorTypeListAction">
- <result name="success" type="velocity">/main.vm</result>
- <param name="page">/dhis-web-maintenance-datadictionary/updateIndicatorForm.vm</param>
- <param name="javascripts">javascript/shortName.js,javascript/indicator.js,javascript/denum.js</param>
- <param name="requiredAuthorities">F_INDICATOR_UPDATE</param>
- </action>
-
- <action name="updateIndicator"
- class="org.hisp.dhis.dd.action.indicator.UpdateIndicatorAction">
- <result name="success" type="redirect">indicator.action
- </result>
- <param name="requiredAuthorities">F_INDICATOR_UPDATE</param>
- </action>
-
- <action name="validateIndicator"
- class="org.hisp.dhis.dd.action.indicator.ValidateIndicatorAction">
- <result name="success" type="velocity-json">
- /dhis-web-commons/ajax/jsonResponseSuccess.vm</result>
- <result name="error" type="velocity-json">
- /dhis-web-commons/ajax/jsonResponseError.vm</result>
- <param name="onExceptionReturn">plainTextError</param>
- </action>
-
<!-- DataDictionary -->
<action name="setCurrentDataDictionary"
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/indicator.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/indicator.vm 2010-10-19 10:12:54 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/indicator.vm 2010-11-20 08:23:34 +0000
@@ -73,7 +73,7 @@
</td>
<td style="width:20em; padding-left:2em; vertical-align:top">
- <div id="detailsArea" style="top:70px;right:20px;display:none">
+ <div id="detailsArea" style="display:none">
<div style="float:right">
<a href="javascript:hideDetails()" title="$i18n.getString( 'hide_details' )"><img src="../images/close.png" alt="$i18n.getString( 'hide_details' )"/></a>
</div>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/indicatorGroup.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/indicatorGroup.vm 2010-09-21 06:16:05 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/indicatorGroup.vm 2010-11-20 08:23:34 +0000
@@ -66,30 +66,4 @@
jQuery(document).ready(function(){
tableSorter( 'listTable' );
});
-
- function showIndicatorGroupDetails( indicatorGroupId )
- {
- var request = new Request();
- request.setResponseTypeXML( 'indicatorGroup' );
- request.setCallbackSuccess( indicatorGroupReceived );
- request.send( 'getIndicatorGroup.action?id=' + indicatorGroupId );
- }
-
- function indicatorGroupReceived( indicatorGroupElement )
- {
- setInnerHTML( 'nameField', getElementValue( indicatorGroupElement, 'name' ) );
- setInnerHTML( 'memberCountField', getElementValue( indicatorGroupElement, 'memberCount' ) );
-
- showDetails();
- }
-
- // -----------------------------------------------------------------------------
- // Remove indicator group
- // -----------------------------------------------------------------------------
-
- function removeIndicatorGroup( indicatorGroupId, indicatorGroupName )
- {
- removeItem( indicatorGroupId, indicatorGroupName, i18n_confirm_delete, 'removeIndicatorGroup.action' );
- }
-
</script>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/indicatorGroupSet.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/indicatorGroupSet.vm 2010-09-21 06:16:05 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/indicatorGroupSet.vm 2010-11-20 08:23:34 +0000
@@ -66,38 +66,5 @@
var i18n_information = '$encoder.jsEscape( $i18n.getString( "show_details" ) , "'")';
jQuery(document).ready(function(){
tableSorter( 'listTable' );
- });
-
- // -----------------------------------------------------------------------------
- // Delete Indicator Group Set
- // -----------------------------------------------------------------------------
-
- function deleteIndicatorGroupSet( groupSetId, groupSetName ){
-
- removeItem( groupSetId, groupSetName, i18n_confirm_delete, "deleteIndicatorGroupSet.action" );
- }
-
- // -----------------------------------------------------------------------------
- // Show Data Element Group Set details
- // -----------------------------------------------------------------------------
-
- function showIndicatorGroupSetDetails( id ){
-
- var request = new Request();
- request.setResponseTypeXML( 'indicatorGroupSet' );
- request.setCallbackSuccess( showDetailsCompleted );
- request.sendAsPost( "id=" + id );
- request.send( "showIndicatorGroupSetDetails.action");
-
- }
-
- function showDetailsCompleted( indicatorGroupSet ){
-
- setInnerHTML( 'nameField', getElementValue( indicatorGroupSet, 'name' ) );
- setInnerHTML( 'memberCountField', getElementValue( indicatorGroupSet, 'memberCount' ) );
-
- showDetails();
- }
-
-
+ });
</script>
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/dataElement.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/dataElement.js 2010-11-07 12:01:24 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/dataElement.js 2010-11-20 08:23:34 +0000
@@ -50,7 +50,7 @@
var request = new Request();
request.setResponseTypeXML( 'dataElement' );
request.setCallbackSuccess( dataElementReceived );
- request.send( 'getDataElement.action?id=' + dataElementId );
+ request.send( '../dhis-web-commons-ajax/getDataElement.action?id=' + dataElementId );
}
function dataElementReceived( dataElementElement )
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/dataElementGroup.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/dataElementGroup.js 2010-11-02 13:02:10 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/dataElementGroup.js 2010-11-20 08:23:34 +0000
@@ -17,7 +17,7 @@
var request = new Request();
request.setResponseTypeXML( 'dataElementGroup' );
request.setCallbackSuccess( dataElementGroupReceived );
- request.send( 'getDataElementGroup.action?id=' + dataElementGroupId );
+ request.send( '../dhis-web-commons-ajax/getDataElementGroup.action?id=' + dataElementGroupId );
}
function dataElementGroupReceived( dataElementGroupElement )
@@ -60,7 +60,6 @@
function searchDataElementGroupPaging(currentPage, pageSize)
{
-
var params = 'key=' + getFieldValue( 'key' );
params += '¤tPage=' + currentPage;
params += '&pageSize=' + pageSize;
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/dataElementGroupSet.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/dataElementGroupSet.js 2010-09-01 16:55:23 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/dataElementGroupSet.js 2010-11-20 08:23:34 +0000
@@ -55,10 +55,9 @@
var request = new Request();
request.setResponseTypeXML( 'dataElementGroupSet' );
request.setCallbackSuccess( showDetailsCompleted );
- request.send( "showDataElementGroupSetDetails.action?id=" + id);
+ request.send( "../dhis-web-commons-ajax/getDataElementGroupSet.action?id=" + id);
}
-
function showDetailsCompleted( dataElementGroupSet ){
setInnerHTML( 'nameField', getElementValue( dataElementGroupSet, 'name' ) );
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/indicator.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/indicator.js 2010-09-01 16:55:23 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/indicator.js 2010-11-20 08:23:34 +0000
@@ -21,7 +21,7 @@
var request = new Request();
request.setResponseTypeXML( 'indicator' );
request.setCallbackSuccess( indicatorReceived );
- request.send( 'getIndicator.action?id=' + indicatorId );
+ request.send( '../dhis-web-commons-ajax/getIndicator.action?id=' + indicatorId );
}
function indicatorReceived( indicatorElement )
=== added file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/indicatorGroup.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/indicatorGroup.js 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/indicatorGroup.js 2010-11-20 08:23:34 +0000
@@ -0,0 +1,25 @@
+
+function showIndicatorGroupDetails( indicatorGroupId )
+{
+ var request = new Request();
+ request.setResponseTypeXML( 'indicatorGroup' );
+ request.setCallbackSuccess( indicatorGroupReceived );
+ request.send( '../dhis-web-commons-ajax/getIndicatorGroup.action?id=' + indicatorGroupId );
+}
+
+function indicatorGroupReceived( indicatorGroupElement )
+{
+ setInnerHTML( 'nameField', getElementValue( indicatorGroupElement, 'name' ) );
+ setInnerHTML( 'memberCountField', getElementValue( indicatorGroupElement, 'memberCount' ) );
+
+ showDetails();
+}
+
+// -----------------------------------------------------------------------------
+// Remove indicator group
+// -----------------------------------------------------------------------------
+
+function removeIndicatorGroup( indicatorGroupId, indicatorGroupName )
+{
+ removeItem( indicatorGroupId, indicatorGroupName, i18n_confirm_delete, 'removeIndicatorGroup.action' );
+}
=== added file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/indicatorGroupSet.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/indicatorGroupSet.js 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/indicatorGroupSet.js 2010-11-20 08:23:34 +0000
@@ -0,0 +1,30 @@
+
+// -----------------------------------------------------------------------------
+// Show Data Element Group Set details
+// -----------------------------------------------------------------------------
+
+function showIndicatorGroupSetDetails( id ){
+
+ var request = new Request();
+ request.setResponseTypeXML( 'indicatorGroupSet' );
+ request.setCallbackSuccess( showDetailsCompleted );
+ request.sendAsPost( "id=" + id );
+ request.send( "../dhis-web-commons-ajax/getIndicatorGroupSet.action" );
+}
+
+function showDetailsCompleted( indicatorGroupSet ){
+
+ setInnerHTML( 'nameField', getElementValue( indicatorGroupSet, 'name' ) );
+ setInnerHTML( 'memberCountField', getElementValue( indicatorGroupSet, 'memberCount' ) );
+
+ showDetails();
+}
+
+// -----------------------------------------------------------------------------
+// Delete Indicator Group Set
+// -----------------------------------------------------------------------------
+
+function deleteIndicatorGroupSet( groupSetId, groupSetName ){
+
+ removeItem( groupSetId, groupSetName, i18n_confirm_delete, "deleteIndicatorGroupSet.action" );
+}
=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/responseDataElement.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/responseDataElement.vm 2010-08-24 09:14:43 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/responseDataElement.vm 1970-01-01 00:00:00 +0000
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<dataElement>
- <id>$dataElement.id</id>
- <name>$encoder.xmlEncode( $dataElement.name )</name>
- <shortName>$encoder.xmlEncode( $dataElement.shortName )</shortName>
- <alternativeName>$!encoder.xmlEncode( $dataElement.alternativeName )</alternativeName>
- <code>$!encoder.xmlEncode( $dataElement.code )</code>
- <description>$!encoder.xmlEncode( $dataElement.description )</description>
- <active>$dataElement.active</active>
- <domainType>$dataElement.getDomainTypeNullSafe()</domainType>
- <valueType>$dataElement.type</valueType>
- <aggregationOperator>$dataElement.aggregationOperator</aggregationOperator>
- <url>$!encoder.xmlEncode( $dataElement.url )</url>
- <lastUpdated>$!format.formatDate( $dataElement.lastUpdated )</lastUpdated>
- <categoryCombo>$!encoder.xmlEncode( $dataElement.categoryCombo.name )</categoryCombo>
-</dataElement>
=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/responseDataElementGroup.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/responseDataElementGroup.vm 2009-03-03 16:46:36 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/responseDataElementGroup.vm 1970-01-01 00:00:00 +0000
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<dataElementGroup>
- <id>$dataElementGroup.id</id>
- <name>$encoder.xmlEncode( $dataElementGroup.name )</name>
- <memberCount>$memberCount</memberCount>
-</dataElementGroup>
=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/responseDataElementGroupSet.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/responseDataElementGroupSet.vm 2009-10-30 07:06:12 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/responseDataElementGroupSet.vm 1970-01-01 00:00:00 +0000
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<dataElementGroupSet>
- <id>$dataElementGroupSet.id</id>
- <name>$encoder.xmlEncode( $dataElementGroupSet.name )</name>
- <memberCount>$dataElementGroupSet.members.size()</memberCount>
-</dataElementGroupSet>
\ No newline at end of file
=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/responseIndicator.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/responseIndicator.vm 2010-10-13 05:20:57 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/responseIndicator.vm 1970-01-01 00:00:00 +0000
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<indicator>
- <id>$indicator.id</id>
- <name>$encoder.xmlEncode( $indicator.name )</name>
- <shortName>$encoder.xmlEncode( $indicator.shortName )</shortName>
- <alternativeName>$!encoder.xmlEncode( $indicator.alternativeName )</alternativeName>
- <code>$!encoder.xmlEncode( $indicator.code )</code>
- <description>$!encoder.xmlEncode( $indicator.description )</description>
- <annualized>$indicator.annualized</annualized>
- <indicatorTypeName>$encoder.xmlEncode( $indicatorTypeName )</indicatorTypeName>
- <numeratorDescription>$encoder.xmlEncode( $indicator.numeratorDescription )</numeratorDescription>
- <denominatorDescription>$encoder.xmlEncode( $indicator.denominatorDescription )</denominatorDescription>
- <url>$!encoder.xmlEncode( $indicator.url )</url>
- <lastUpdated>$!format.formatDate( $indicator.lastUpdated )</lastUpdated>
-</indicator>
=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/responseIndicatorGroup.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/responseIndicatorGroup.vm 2009-03-13 14:32:21 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/responseIndicatorGroup.vm 1970-01-01 00:00:00 +0000
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<indicatorGroup>
- <id>$indicatorGroup.id</id>
- <name>$encoder.xmlEncode( $indicatorGroup.name )</name>
- <memberCount>$memberCount</memberCount>
- <indicators>
- #foreach( $member in $!indicatorGroup.members )
- <indicator>
- <id>$member.id</id>
- <name>$encoder.xmlEncode( $member.name )</name>
- </indicator>
- #end
- </indicators>
-</indicatorGroup>
=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/responseIndicatorGroupSet.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/responseIndicatorGroupSet.vm 2009-10-30 07:06:12 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/responseIndicatorGroupSet.vm 1970-01-01 00:00:00 +0000
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<indicatorGroupSet>
- <id>$indicatorGroupSet.id</id>
- <name>$encoder.xmlEncode( $indicatorGroupSet.name )</name>
- <memberCount>$indicatorGroupSet.members.size()</memberCount>
-</indicatorGroupSet>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/resources/struts.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/resources/struts.xml 2010-10-21 11:06:26 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/resources/struts.xml 2010-11-20 08:23:34 +0000
@@ -101,16 +101,7 @@
<result name="success" type="velocity">status.vm</result>
<result name="onExceptionReturn">plainTextError</result>
</action>
-
-
- <!-- Get details -->
-
- <action name="getDataSet"
- class="org.hisp.dhis.dataset.action.GetDataSetAction">
- <result name="success" type="velocity-xml">/dhis-web-maintenance-dataset/responseDataSetObject.vm</result>
- <param name="onExceptionReturn">plainTextError</param>
- </action>
-
+
<!-- Sort order -->
<action name="showSortDataSetForm"
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/javascript/dataSet.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/javascript/dataSet.js 2010-09-01 16:55:23 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/javascript/dataSet.js 2010-11-20 08:23:34 +0000
@@ -7,7 +7,7 @@
var request = new Request();
request.setResponseTypeXML( 'dataSet' );
request.setCallbackSuccess( dataSetRecieved );
- request.send( 'getDataSet.action?dataSetId=' + dataSetId );
+ request.send( '../dhis-web-commons-ajax/getDataSet.action?id=' + dataSetId );
}
function dataSetRecieved( dataSetElement )
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/responseDataSetObject.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/responseDataSetObject.vm 2009-03-03 16:46:36 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/responseDataSetObject.vm 2010-11-20 08:23:34 +0000
@@ -2,6 +2,7 @@
<dataSet>
<id>$dataSet.id</id>
<name>$encoder.xmlEncode( $dataSet.name )</name>
+ <shortName>$!encoder.xmlEncode( $dataSet.shortName )</shortName>
<frequency>$i18n.getString( $dataSet.periodType.name )</frequency>
<dataElementCount>$dataSetDataElements.size()</dataElementCount>
<dataentryform>#if(!$dataEntryForm) #else $encoder.xmlEncode( $dataEntryForm.name )#end</dataentryform>