dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #06457
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 2054: add log in data entry form
------------------------------------------------------------
revno: 2054
committer: Tran Thanh Tri <Tran Thanh Tri@compaq>
branch nick: trunk
timestamp: Tue 2010-06-29 17:45:36 +0700
message:
add log in data entry form
modified:
dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/multidimensional/FormAction.java
dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/screen/DefaultDataEntryScreenManager.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-dataentry/src/main/java/org/hisp/dhis/de/action/multidimensional/FormAction.java'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/multidimensional/FormAction.java 2010-06-03 10:32:02 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/multidimensional/FormAction.java 2010-06-29 10:45:36 +0000
@@ -37,6 +37,8 @@
import java.util.List;
import java.util.Map;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.hisp.dhis.customvalue.CustomValue;
import org.hisp.dhis.customvalue.CustomValueService;
import org.hisp.dhis.dataelement.CalculatedDataElement;
@@ -55,6 +57,7 @@
import org.hisp.dhis.dataset.DataSet;
import org.hisp.dhis.datavalue.DataValue;
import org.hisp.dhis.datavalue.DataValueService;
+import org.hisp.dhis.de.comments.DefaultStandardCommentsManager;
import org.hisp.dhis.de.comments.StandardCommentsManager;
import org.hisp.dhis.de.screen.DataEntryScreenManager;
import org.hisp.dhis.de.state.SelectedStateManager;
@@ -75,6 +78,8 @@
public class FormAction
implements Action
{
+ private static final Log log = LogFactory.getLog( FormAction.class );
+
// -------------------------------------------------------------------------
// Dependencies
// -------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/screen/DefaultDataEntryScreenManager.java'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/screen/DefaultDataEntryScreenManager.java 2010-06-03 10:32:02 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/screen/DefaultDataEntryScreenManager.java 2010-06-29 10:45:36 +0000
@@ -338,7 +338,7 @@
if ( dataElement == null )
{
- log.info( "Data Element does not exist in system : " + dataElementId );
+ log.error( "Data Element does not exist in system : " + dataElementId );
return "Data Element does not exist in system : " + dataElementId;
}
@@ -620,7 +620,11 @@
if ( dataElement == null )
{
- throw new RuntimeException( "Data Element Id: " + dataElementId + " not found" );
+ //throw new RuntimeException( "Data Element Id: " + dataElementId + " not found" );
+
+ log.error( "Data Element Id: " + dataElementId + " not found in this data set" );
+
+ return "Data Element Id :" + dataElementId + " not found in this data set";
}
// -------------------------------------------------------------
@@ -893,6 +897,8 @@
for ( DataElement element : dataSet.getDataElements() )
{
+ log.info( "Data Element in data set: " + element.getId() );
+
map.put( element.getId(), element );
}