← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 3224: Fix bug: Thrown exception when adding a new orgunit.

 

------------------------------------------------------------
revno: 3224
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2011-03-31 09:27:05 +0700
message:
  Fix bug: Thrown exception when adding a new orgunit.
modified:
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/organisationunit/GetCompulsoryGroupSetAction.java
  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/webapp/dhis-web-maintenance-organisationunit/addOrganisationUnitForm.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/updateOrganisationUnitForm.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
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/organisationunit/GetCompulsoryGroupSetAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/organisationunit/GetCompulsoryGroupSetAction.java	2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/organisationunit/GetCompulsoryGroupSetAction.java	2011-03-31 02:27:05 +0000
@@ -67,6 +67,11 @@
 
     private Integer organisationUnitId;
     
+    public Integer getOrganisationUnitId()
+    {
+        return organisationUnitId;
+    }
+
     public void setOrganisationUnitId( Integer organisationUnitId )
     {
         this.organisationUnitId = organisationUnitId;

=== 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-03-24 17:03:33 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/resources/struts.xml	2011-03-31 02:27:05 +0000
@@ -49,7 +49,7 @@
 
 		<action name="addOrganisationUnit"
 			class="org.hisp.dhis.oum.action.organisationunit.AddOrganisationUnitAction">
-			<result name="success" type="chain">getCompulsoryGroupSet
+			<result name="success" type="redirect">getCompulsoryGroupSet.action?organisationUnitId=${organisationUnitId}
 			</result>
 			<param name="requiredAuthorities">F_ORGANISATIONUNIT_ADD</param>
 		</action>
@@ -64,7 +64,7 @@
 
 		<action name="assignOrganisationUnitToGroups"
 			class="org.hisp.dhis.oum.action.organisationunit.AssignOrganisationUnitToGroupsAction">
-			<result name="success" type="chain">getCompulsoryGroupSet
+			<result name="success" type="redirect">getCompulsoryGroupSet.action?organisationUnitId=${organisationUnitId}
 			</result>
 		</action>
 

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/addOrganisationUnitForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/addOrganisationUnitForm.vm	2011-03-22 09:35:27 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/addOrganisationUnitForm.vm	2011-03-31 02:27:05 +0000
@@ -17,11 +17,11 @@
 		<td><input type="text" id="name" name="name" onchange="nameChanged()" style="width:20em"/></td>
 	</tr>
 	<tr>
-		<td><label for="shortName">$i18n.getString( "short_name" )</label></td>
+		<td><label for="shortName">$i18n.getString( "short_name" ) <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
 		<td><input type="text" id="shortName" name="shortName" style="width:20em"/></td>
 	</tr>
 	<tr>
-		<td><label for="code">$i18n.getString( "code" )</label></td>
+		<td><label for="code">$i18n.getString( "code" ) <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
 		<td><input type="text" id="code" name="code" style="width:20em"/></td>
 	</tr>
 	<tr>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/updateOrganisationUnitForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/updateOrganisationUnitForm.vm	2011-03-21 15:10:48 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/updateOrganisationUnitForm.vm	2011-03-31 02:27:05 +0000
@@ -34,11 +34,11 @@
 		<td><input type="text" id="name" name="name" value="$encoder.htmlEncode( $organisationUnit.name )" onchange="nameChanged()" style="width:20em"></td>
 	</tr>
 	<tr>
-		<td><label for="shortName">$i18n.getString( "short_name" )</label></td>
+		<td><label for="shortName">$i18n.getString( "short_name" ) <em title="$i18n.getString( "required" )" class="required">*</em></label></td>
 		<td><input type="text" id="shortName" name="shortName" value="$encoder.htmlEncode( $organisationUnit.shortName )" style="width:20em"></td>
 	</tr>
 	<tr>
-		<td><label for="code">$i18n.getString( "code" )</label></td>
+		<td><label for="code">$i18n.getString( "code" ) <em title="$i18n.getString( "required" )" class="required">*</em></label></td>
 		<td><input type="text" id="code" name="code" value="$!encoder.htmlEncode( $organisationUnit.code )" style="width:20em"/></td>
 	</tr>
 	<tr>