← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 7905: [mobile] using prototype in beans

 

------------------------------------------------------------
revno: 7905
committer: Long <thanhlongngo1988@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2012-08-13 17:06:08 +0700
message:
  [mobile] using prototype in beans
modified:
  dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/anonymous/action/GetAllAnonymousProgramAction.java
  dhis-2/dhis-web/dhis-web-light/src/main/resources/META-INF/dhis/beans.xml
  dhis-2/dhis-web/dhis-web-light/src/main/resources/struts.xml
  dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/anonymous/anonymousProgramSelection.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-light/src/main/java/org/hisp/dhis/light/anonymous/action/GetAllAnonymousProgramAction.java'
--- dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/anonymous/action/GetAllAnonymousProgramAction.java	2012-06-18 10:29:46 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/anonymous/action/GetAllAnonymousProgramAction.java	2012-08-13 10:06:08 +0000
@@ -30,8 +30,6 @@
 import java.util.ArrayList;
 import java.util.Collection;
 
-
-
 import org.hisp.dhis.program.Program;
 import org.hisp.dhis.program.ProgramService;
 
@@ -68,10 +66,22 @@
         return programs;
     }
 
+    private boolean validated;
+
+    public boolean isValidated()
+    {
+        return validated;
+    }
+
+    public void setValidated( boolean validated )
+    {
+        this.validated = validated;
+    }
+
     // -------------------------------------------------------------------------
     // Implementation Action
     // -------------------------------------------------------------------------
-
+    
     @Override
     public String execute()
         throws Exception

=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-web/dhis-web-light/src/main/resources/META-INF/dhis/beans.xml	2012-07-30 10:56:25 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/resources/META-INF/dhis/beans.xml	2012-08-13 10:06:08 +0000
@@ -195,7 +195,7 @@
 
 	<bean
 		id="org.hisp.dhis.light.namebaseddataentry.action.GetPatientProgramListAction"
-		class="org.hisp.dhis.light.namebaseddataentry.action.GetPatientProgramListAction">
+		class="org.hisp.dhis.light.namebaseddataentry.action.GetPatientProgramListAction" scope="prototype">
 		<property name="patientService" ref="org.hisp.dhis.patient.PatientService" />
 		<property name="programInstanceService" ref="org.hisp.dhis.program.ProgramInstanceService" />
 		<property name="programService" ref="org.hisp.dhis.program.ProgramService" />

=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/resources/struts.xml'
--- dhis-2/dhis-web/dhis-web-light/src/main/resources/struts.xml	2012-07-23 09:58:04 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/resources/struts.xml	2012-08-13 10:06:08 +0000
@@ -410,7 +410,7 @@
 
     <action name="saveAnonymousForm"
         class="org.hisp.dhis.light.anonymous.action.SaveAnonymousProgramAction">
-      <result name="success" type="redirect">/light/anonymous.action</result>
+      <result name="success" type="redirect">/light/anonymous.action?validated=true</result>
       <result name="error" type="velocity">/dhis-web-light/main.vm</result>
       <param name="page">/dhis-web-light/anonymous/anonymousProgramForm.vm</param>
     </action>

=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/anonymous/anonymousProgramSelection.vm'
--- dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/anonymous/anonymousProgramSelection.vm	2012-06-19 03:45:39 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/anonymous/anonymousProgramSelection.vm	2012-08-13 10:06:08 +0000
@@ -1,5 +1,9 @@
-
 <h2>$i18n.getString("anonymous_menu")</h2>
+	#if( $validated)
+		<div class="header-box">
+			<h3 style="text-align: left;">$i18n.getString("successfully_saved")</h3>
+		</div>	
+	#end
 <p>
 <ul>
 #foreach( $program in $programs)