← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 9607: Better feedback from server in data entry

 

------------------------------------------------------------
revno: 9607
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2013-01-24 18:40:47 +0200
message:
  Better feedback from server in data entry
modified:
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/css/print.css
  dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/SaveValueAction.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-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/css/print.css'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/css/print.css	2013-01-24 14:06:26 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/css/print.css	2013-01-24 16:40:47 +0000
@@ -4,7 +4,7 @@
   -webkit-print-color-adjust: exact;
 }
 
-div#header, #headerMessage, div#leftBar, div#headerMessage, div#rightBar
+div#header, div#headerMessage, div#leftBar, div#headerMessage, div#rightBar
 {
   display: none;
 }

=== modified file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/SaveValueAction.java'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/SaveValueAction.java	2013-01-04 18:10:25 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/SaveValueAction.java	2013-01-24 16:40:47 +0000
@@ -164,12 +164,27 @@
 
         OrganisationUnit organisationUnit = organisationUnitService.getOrganisationUnit( organisationUnitId );
 
+        if ( organisationUnit == null )
+        {
+            return logError( "Invalid organisation unit identifier: " + organisationUnitId );
+        }
+        
         DataElement dataElement = dataElementService.getDataElement( dataElementId );
 
+        if ( dataElement == null )
+        {
+            return logError( "Invalid data element identifier: " + dataElementId );
+        }
+        
+        DataElementCategoryOptionCombo optionCombo = categoryService.getDataElementCategoryOptionCombo( optionComboId );
+
+        if ( optionCombo == null )
+        {
+            return logError( "Invalid category option combo identifier: " + optionComboId );
+        }
+        
         String storedBy = currentUserService.getCurrentUsername();
 
-        DataElementCategoryOptionCombo optionCombo = categoryService.getDataElementCategoryOptionCombo( optionComboId );
-
         Date now = new Date();
 
         if ( storedBy == null )