← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 10543: [mobile lwuit] - add validation for dynamic atts

 

------------------------------------------------------------
revno: 10543
committer: Homg Em <em.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2013-04-15 10:09:26 +0700
message:
  [mobile  lwuit] - add validation for dynamic atts
modified:
  dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/ActivityReportingServiceImpl.java


--
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-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/ActivityReportingServiceImpl.java'
--- dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/ActivityReportingServiceImpl.java	2013-04-10 03:13:47 +0000
+++ dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/ActivityReportingServiceImpl.java	2013-04-15 03:09:26 +0000
@@ -27,6 +27,7 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+import java.net.IDN;
 import java.text.DateFormat;
 import java.text.SimpleDateFormat;
 import java.util.ArrayList;
@@ -1575,6 +1576,10 @@
         {
             String id = "";
             String idt = identifierType.getName();
+            if ( identifierType.isMandatory() == true )
+            {
+                idt += " (*)";
+            }
             list.add( new org.hisp.dhis.api.mobile.model.PatientIdentifier( idt, id ) );
         }
         return list;
@@ -1587,6 +1592,10 @@
         for ( org.hisp.dhis.patient.PatientAttribute pa : getPatientAtts() )
         {
             String name = pa.getName();
+            if ( pa.isMandatory() == true )
+            {
+                name += " (*)";
+            }
             String value = "";
             list.add( new PatientAttribute( name, value ) );
         }