← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 16310: Minor fix.

 

------------------------------------------------------------
revno: 16310
committer: Tran Chau<tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2014-08-04 23:31:45 +0700
message:
  Minor fix.
modified:
  dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/program/DefaultProgramDataEntryService.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-tracker/src/main/java/org/hisp/dhis/program/DefaultProgramDataEntryService.java'
--- dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/program/DefaultProgramDataEntryService.java	2014-07-29 07:52:47 +0000
+++ dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/program/DefaultProgramDataEntryService.java	2014-08-04 16:31:45 +0000
@@ -596,6 +596,7 @@
             for ( Option option : dataElement.getOptionSet().getOptions() )
             {
                 String optionValue = option.getName();
+                String optionCode = option.getCode();
                 if ( index == 4 )
                 {
                     inputHTML += "</tr><tr>";
@@ -603,11 +604,11 @@
                 }
 
                 inputHTML += "<td>" + metaData;
-                if ( entityInstanceDataValue != null && entityInstanceDataValue.getValue().equals( optionValue ) )
+                if ( entityInstanceDataValue != null && entityInstanceDataValue.getValue().equals( optionCode ) )
                 {
                     inputHTML += " checked ";
                 }
-                inputHTML += " onclick=\"saveRadio( \'" + dataElement.getUid() + "\', \'" + optionValue + "\' )\"  />"
+                inputHTML += " onclick=\"saveRadio( \'" + dataElement.getUid() + "\', \'" + optionCode + "\' )\"  />"
                     + optionValue;
                 inputHTML += "</td>";
                 index++;