=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/dataentry/action/GetSectionFormAction.java' --- dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/dataentry/action/GetSectionFormAction.java 2011-09-28 10:34:08 +0000 +++ dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/dataentry/action/GetSectionFormAction.java 2011-09-29 10:23:26 +0000 @@ -88,6 +88,11 @@ this.sectionFormUtils = sectionFormUtils; } + public SectionFormUtils getSectionFormUtils() + { + return sectionFormUtils; + } + // ------------------------------------------------------------------------- // Input & Output // ------------------------------------------------------------------------- === modified file 'dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/dataentry/action/SaveSectionFormAction.java' --- dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/dataentry/action/SaveSectionFormAction.java 2011-09-28 10:44:46 +0000 +++ dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/dataentry/action/SaveSectionFormAction.java 2011-09-29 10:23:26 +0000 @@ -129,6 +129,11 @@ this.sectionFormUtils = sectionFormUtils; } + public SectionFormUtils getSectionFormUtils() + { + return sectionFormUtils; + } + // ------------------------------------------------------------------------- // Input & Output // ------------------------------------------------------------------------- === modified file 'dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/dataentry/utils/SectionFormUtils.java' --- dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/dataentry/utils/SectionFormUtils.java 2011-09-28 10:34:08 +0000 +++ dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/dataentry/utils/SectionFormUtils.java 2011-09-29 10:23:26 +0000 @@ -164,4 +164,44 @@ return dataValueMap; } + + // ------------------------------------------------------------------------- + // Static Utils + // ------------------------------------------------------------------------- + + public static boolean valueHigher( String value, int max ) + { + int integerValue; + + try + { + integerValue = Integer.parseInt( value ); + + if(integerValue > max) + { + return true; + } + } catch ( NumberFormatException e ) + { } + + return false; + } + + public static boolean valueLower( String value, int min ) + { + int integerValue; + + try + { + integerValue = Integer.parseInt( value ); + + if(integerValue < min) + { + return true; + } + } catch ( NumberFormatException e ) + { } + + return false; + } } === modified file 'dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/dataEntry.vm' --- dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/dataEntry.vm 2011-09-28 19:31:03 +0000 +++ dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/dataEntry.vm 2011-09-29 10:23:26 +0000 @@ -1,4 +1,6 @@ +#set( $Integer = 0 ) +