dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #19351
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 8401: Updated the J2ME applications for HP - India.
------------------------------------------------------------
revno: 8401
committer: thaichuong159 <thaichuong159@xxxxxxxxx>
branch nick: dhis2
timestamp: Sat 2012-10-06 18:36:56 +0700
message:
Updated the J2ME applications for HP - India.
modified:
local/in/dhis-mobile/J2ME/HP/CHC/CHCForm1/nbproject/build-impl.xml
local/in/dhis-mobile/J2ME/HP/CHC/CHCForm1/nbproject/genfiles.properties
local/in/dhis-mobile/J2ME/HP/CHC/CHCForm1/nbproject/private/private.properties
local/in/dhis-mobile/J2ME/HP/CHC/CHCForm1/nbproject/private/private.xml
local/in/dhis-mobile/J2ME/HP/CHC/CHCForm1/src/org/hispindia/mobile/SCForm1.java
local/in/dhis-mobile/J2ME/HP/CHC/CHCForm1/src/org/hispindia/mobile/SCForm1.vmd
local/in/dhis-mobile/J2ME/HP/HMIS-CHC/SCForm1/nbproject/private/private.properties
local/in/dhis-mobile/J2ME/HP/HMIS-CHC/SCForm1/src/org/hispindia/mobile/SCForm1.java
local/in/dhis-mobile/J2ME/HP/HMIS-CHC/SCForm1/src/org/hispindia/mobile/SCForm1.vmd
local/in/dhis-mobile/J2ME/HP/HMIS-PHC/SCForm1/nbproject/private/private.properties
local/in/dhis-mobile/J2ME/HP/HMIS-PHC/SCForm1/nbproject/private/private.xml
local/in/dhis-mobile/J2ME/HP/HMIS-PHC/SCForm1/src/org/hispindia/mobile/SCForm1.java
local/in/dhis-mobile/J2ME/HP/HMIS-PHC/SCForm1/src/org/hispindia/mobile/SCForm1.vmd
local/in/dhis-mobile/J2ME/HP/HMIS-SUBCENTER/SCForm1/nbproject/private/private.properties
local/in/dhis-mobile/J2ME/HP/HMIS-SUBCENTER/SCForm1/nbproject/private/private.xml
local/in/dhis-mobile/J2ME/HP/HMIS-SUBCENTER/SCForm1/src/org/hispindia/mobile/SCForm1.java
local/in/dhis-mobile/J2ME/HP/HMIS-SUBCENTER/SCForm1/src/org/hispindia/mobile/SCForm1.vmd
local/in/dhis-mobile/J2ME/HP/IDSP jar S_1/SCForm1/nbproject/private/private.properties
local/in/dhis-mobile/J2ME/HP/IDSP jar S_1/SCForm1/nbproject/private/private.xml
local/in/dhis-mobile/J2ME/HP/IDSP jar S_1/SCForm1/src/org/hispindia/mobile/SCForm1.java
local/in/dhis-mobile/J2ME/HP/IDSP jar S_1/SCForm1/src/org/hispindia/mobile/SCForm1.vmd
local/in/dhis-mobile/J2ME/HP/MORTALITY/SCForm1/nbproject/private/private.properties
local/in/dhis-mobile/J2ME/HP/MORTALITY/SCForm1/nbproject/private/private.xml
local/in/dhis-mobile/J2ME/HP/MORTALITY/SCForm1/src/org/hispindia/mobile/SCForm1.java
local/in/dhis-mobile/J2ME/HP/MORTALITY/SCForm1/src/org/hispindia/mobile/SCForm1.vmd
local/in/dhis-mobile/J2ME/HP/PHC/SCForm1/nbproject/private/private.properties
local/in/dhis-mobile/J2ME/HP/PHC/SCForm1/src/org/hispindia/mobile/SCForm1.java
local/in/dhis-mobile/J2ME/HP/PHC/SCForm1/src/org/hispindia/mobile/SCForm1.vmd
--
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 'local/in/dhis-mobile/J2ME/HP/CHC/CHCForm1/nbproject/build-impl.xml'
--- local/in/dhis-mobile/J2ME/HP/CHC/CHCForm1/nbproject/build-impl.xml 2012-05-23 13:55:43 +0000
+++ local/in/dhis-mobile/J2ME/HP/CHC/CHCForm1/nbproject/build-impl.xml 2012-10-06 11:36:56 +0000
@@ -180,46 +180,6 @@
</and>
</condition>
</target>
- <!--ricoh-init-->
- <target name="ricoh-pre-init" if="cdc-platform.trigger">
- <condition property="ricoh-platform.trigger">
- <equals arg1="ricoh" arg2="${platform.type}" casesensitive="false"/>
- </condition>
- </target>
- <target name="ricoh-init" depends="ricoh-pre-init" if="ricoh-platform.trigger">
- <available property="jcifs" classname="jcifs.smb.SmbFile" classpath="${libs.RicohAntTools.classpath}"/>
- <condition property="no.vendor.name" value="true">
- <equals arg1="${application.vendor}" arg2="" trim="true"/>
- </condition>
- <condition property="ricoh.dalp.install.mode" value="auto" else="manual">
- <istrue value="${ricoh.dalp.install.mode.auto}"/>
- </condition>
- <condition property="ricoh.dalp.display-mode.type" value="COLOR" else="MONO">
- <istrue value="${ricoh.dalp.display-mode.color}"/>
- </condition>
- <property name="xml.dir" value="${build.dir}/dalp"/>
- <property name="xlet.dalp" value="${application.name}.dalp"/>
- <property name="xlet.dalp.name-only" value="${application.name}.dalp"/>
- <property name="deploy.dir" value="${dist.dir}/deploy"/>
- <property name="rideploy.zip" value="${dist.dir}/${application.name}.zip"/>
- <property name="ricoh.dalp.is-managed" value="true"/>
- <property name="ricoh.dalp.information.is-icon-used" value="true"/>
- <property name="ricoh.platform.target.version" value="2.0"/>
- <property name="ricoh.dalp.version" value="${deployment.number}"/>
- <property name="ricoh.dalp.application-desc.visible" value="true"/>
- <property name="ricoh.dalp.install.destination" value="hdd"/>
- <property name="ricoh.dalp.install.work-dir" value="hdd"/>
- <property name="ricoh.dalp.information.abbreviation" value="RICOH"/>
- <taskdef name="taskIf" classname="ricoh.ant.ConditionalTask" classpath="${libs.ricoh-ant-utils.classpath}"/>
- <taskdef name="dalp" classname="org.netbeans.modules.j2me.cdc.project.ricoh.DalpBuilder" classpath="${libs.ricoh-ant-utils.classpath}"/>
- <property name="dalp.dist" value="${build.dir}/dalp/${application.name}.dalp"/>
- <property name="deployment.dir" location="${dist.dir}"/>
- <patternset id="deployment.patternset">
- <include name="${dist.jar}"/>
- <include name="${application.name}.dalp"/>
- <include name="lib/*"/>
- </patternset>
- </target>
<!--semc-init-->
<target name="semc-pre-init" if="cdc-platform.trigger">
<condition property="semc-platform.trigger">
@@ -334,22 +294,10 @@
<include name="${dist.jar}"/>
</patternset>
</target>
- <!--nsicom-init-->
- <target name="nsicom-pre-init" if="cdc-platform.trigger">
- <condition property="nsicom-platform.trigger">
- <equals arg1="nsicom" arg2="${platform.type}" casesensitive="false"/>
- </condition>
- </target>
- <target name="nsicom-init" depends="nsicom-pre-init" if="nsicom-platform.trigger">
- <property name="deployment.dir" location="${dist.dir}"/>
- <patternset id="deployment.patternset">
- <include name="${dist.jar}"/>
- </patternset>
- </target>
<!--init-->
<target name="pre-init"/>
<target name="post-init"/>
- <target name="init" depends="pre-init,load-properties,basic-init,cldc-init,cdc-init,ricoh-init,semc-init,savaje-init,sjmc-init,ojec-init,cdc-hi-init,nokiaS80-init,nsicom-init,post-init"/>
+ <target name="init" depends="pre-init,load-properties,basic-init,cldc-init,cdc-init,semc-init,savaje-init,sjmc-init,ojec-init,cdc-hi-init,nokiaS80-init,post-init"/>
<!--conditional clean-->
<target name="conditional-clean-init">
<uptodate property="no.clean.before.build" targetfile="${build.dir}/.timestamp">
@@ -663,14 +611,6 @@
<fileset dir="${buildsystem.baton}"/>
</jar>
</target>
- <!--nsicom-create-manifest-->
- <target name="nsicom-create-manifest" if="nsicom-platform.trigger">
- <jar jarfile="${dist.dir}/${dist.jar}" compress="${jar.compress}" update="true">
- <manifest>
- <attribute name="Main-Class" value="${main.class}"/>
- </manifest>
- </jar>
- </target>
<!--do-jar-no-manifest-->
<target name="do-jar-no-manifest" unless="manifest.available">
<dirname file="${dist.dir}/${dist.jar}" property="dist.jar.dir"/>
@@ -686,79 +626,6 @@
<target name="sign-jar" if="sign.jar.trigger">
<signjar jar="${dist.dir}/${dist.jar}" alias="${sign.alias}" keystore="${sign.keystore}" storepass="${sign.keystore.password}" keypass="${sign.alias.password}"/>
</target>
- <!--ricoh-init-dalp-->
- <target name="ricoh-init-dalp" if="ricoh-platform.trigger">
- <property name="ricoh.application.telephone" value=""/>
- <property name="ricoh.application.fax" value=""/>
- <property name="ricoh.application.email" value=""/>
- <condition property="no.unmanaged.dalp">
- <and>
- <isfalse value="${ricoh.dalp.is-managed}"/>
- <not>
- <available file="./${application.name}.dalp"/>
- </not>
- </and>
- </condition>
- <fail if="no.unmanaged.dalp" message="Dalp file ${application.name}.dalp is required in project directory when DALP management is set to off."/>
- <condition property="no.vendor.name" value="true">
- <equals arg1="${application.vendor}" arg2="" trim="true"/>
- </condition>
- <condition property="ricoh.icon.invalid" value="true">
- <or>
- <contains string="${ricoh.application.icon}" substring="$${"/>
- <equals arg1="${ricoh.application.icon}" arg2="" trim="true"/>
- </or>
- </condition>
- <mkdir dir="${dist.dir}/lib"/>
- </target>
- <!--ricoh-add-app-icon-->
- <target name="ricoh-add-app-icon" depends="ricoh-init-dalp" if="ricoh-platform.trigger" unless="ricoh.icon.invalid">
- <pathconvert property="icon.name" pathsep=" ">
- <path path="${ricoh.application.icon}"/>
- <chainedmapper>
- <flattenmapper/>
- <globmapper from="*" to="*"/>
- </chainedmapper>
- </pathconvert>
- <jar jarfile="${dist.jar}" compress="${jar.compress}" update="true">
- <fileset file="${ricoh.application.icon}"/>
- </jar>
- </target>
- <!--ricoh-build-dalp-with-icon-->
- <target name="ricoh-build-dalp-with-icon" depends="ricoh-add-app-icon" if="ricoh-platform.trigger" unless="ricoh.icon.invalid">
- <mkdir dir="${build.dir}/dalp/"/>
- <taskIf if="ricoh.dalp.is-managed" value="true">
- <dalp file="${dalp.dist}" iconname="${icon.name}">
- <fileset dir="${dist.dir}/lib"/>
- </dalp>
- <echo message="Managed dalp file ${dalp.dist} created w/ icon"/>
- </taskIf>
- <taskIf if="ricoh.dalp.is-managed" value="false">
- <copy tofile="${dalp.dist}">
- <fileset file="./${application.name}.dalp"/>
- </copy>
- <echo message="Non-managed dalp file ${dalp.dist} w/ icon imported"/>
- </taskIf>
- </target>
- <!--ricoh-build-dalp-without-icon-->
- <target name="ricoh-build-dalp-without-icon" if="ricoh.icon.invalid">
- <mkdir dir="${build.dir}/dalp/"/>
- <taskIf if="ricoh.dalp.is-managed" value="true">
- <dalp file="${dalp.dist}">
- <fileset dir="${dist.dir}/lib"/>
- </dalp>
- <echo message="Managed dalp file ${dalp.dist} created w/o icon"/>
- </taskIf>
- <taskIf if="ricoh.dalp.is-managed" value="false">
- <copy tofile="${dalp.dist}">
- <fileset file="./${application.name}.dalp"/>
- </copy>
- <echo message="Non-managed dalp file ${dalp.dist} w/o icon imported"/>
- </taskIf>
- </target>
- <target name="ricoh-build-dalp" depends="ricoh-build-dalp-with-icon,ricoh-build-dalp-without-icon" if="ricoh-platform.trigger">
- <copy todir="${dist.dir}" file="${dalp.dist}" overwrite="true"/>
- </target>
<!--savaje-build-jnlp-->
<target name="savaje-prepare-icon" if="savaje-platform.trigger" unless="savaje.icon.invalid">
<pathconvert property="savaje.application.icon.name" pathsep=" ">
@@ -792,7 +659,7 @@
<!--jar-->
<target name="pre-jar"/>
<target name="post-jar"/>
- <target name="jar" depends="preverify,pre-jar,set-password,create-jad,do-extra-libs,nokiaS80-create-manifest,jad-jsr211-properties,semc-build-j9,do-jar,nsicom-create-manifest,do-jar-no-manifest,update-jad,sign-jar,ricoh-build-dalp,savaje-build-jnlp,post-jar" description="Build jar and application descriptor."/>
+ <target name="jar" depends="preverify,pre-jar,set-password,create-jad,do-extra-libs,nokiaS80-create-manifest,jad-jsr211-properties,semc-build-j9,do-jar,do-jar-no-manifest,update-jad,sign-jar,savaje-build-jnlp,post-jar" description="Build jar and application descriptor."/>
<!--override-jad-->
<target name="override-jad" if="override.jarurl.trigger">
<property name="deployment.jarurl" value="${dist.jar}"/>
@@ -914,19 +781,6 @@
<target name="cldc-run" if="cldc-platform.trigger">
<nb-run jadfile="${dist.dir}/${dist.jad}" jarfile="${dist.dir}/${dist.jar}" jadurl="${dist.jad.url}" device="${platform.device}" platformhome="${platform.home}" platformtype="${platform.type}" execmethod="${run.method}" securitydomain="${evaluated.run.security.domain}" commandline="${platform.runcommandline}" classpath="${platform.bootclasspath}:${dist.dir}/${dist.jar}" cmdoptions="${run.cmd.options}"/>
</target>
- <!--ricoh-run-->
- <target name="ricoh-run" if="ricoh-platform.trigger">
- <copy todir="${platform.home}/mnt/sd3/sdk/dsdk/dist/${ricoh.application.uid}" overwrite="true">
- <fileset dir="${dist.dir}">
- <patternset refid="deployment.patternset"/>
- </fileset>
- <flattenmapper/>
- </copy>
- <ant antfile="${platform.home}/startemulator.xml" target="start_emulator" dir="${platform.home}">
- <property name="emulator.skin" value="WVGA.xml"/>
- <property name="emulator.autolaunchid" value="${ricoh.application.uid}"/>
- </ant>
- </target>
<!--semc-run-and-debug-prepare-targets-->
<target name="semc-icon-assembly" if="semc-platform.trigger" unless="semc.icon.invalid">
<copy file="${semc.application.icon}" tofile="${platform.home}/epoc32/release/winscw/udeb/z/Resource/Apps/${semc.application.uid}.mbm" failonerror="false"/>
@@ -997,14 +851,6 @@
</fileset>
</nokiaexec>
</target>
- <!--nsicom-run-->
- <target name="nsicom-run" if="nsicom-platform.trigger">
- <nsicomExecDeploy home="${platform.home}" mainclass="${main.class}" args="${application.args}" jvmargs="${run.jvmargs}" device="${platform.device}" profile="${platform.profile}" xlet="${main.class.xlet}" applet="${main.class.applet}" verbose="${nsicom.application.runverbose}" hostip="${nsicom.application.monitorhost}" runondevice="${nsicom.application.runremote}" remotevmlocation="${nsicom.remotevm.location}" remoteDataLocation="${nsicom.remoteapp.location}">
- <fileset dir="${dist.dir}">
- <exclude name="javadoc/**"/>
- </fileset>
- </nsicomExecDeploy>
- </target>
<!--cdc-hi-run-->
<target name="-pre-cdc-hi-run" if="cdc-hi-platform.trigger"/>
<target name="-cdc-hi-run" if="cdc-hi-platform.trigger">
@@ -1041,8 +887,8 @@
</target>
<!--run-->
<target name="pre-run"/>
- <target name="run" depends="jar,pre-run,open-netmon,cldc-run,ricoh-run,semc-run,savaje-run,sjmc-run,ojec-run,nokiaS80-run,nsicom-run,cdc-hi-run,open-profiler" description="Run MIDlet suite."/>
- <target name="run-no-build" depends="init,pre-run,open-netmon,cldc-run,ricoh-run,semc-run,savaje-run,sjmc-run,ojec-run,nokiaS80-run,nsicom-run,cdc-hi-run,open-profiler" description="Quick Run already built MIDlet suite."/>
+ <target name="run" depends="jar,pre-run,open-netmon,cldc-run,semc-run,savaje-run,sjmc-run,ojec-run,nokiaS80-run,cdc-hi-run,open-profiler" description="Run MIDlet suite."/>
+ <target name="run-no-build" depends="init,pre-run,open-netmon,cldc-run,semc-run,savaje-run,sjmc-run,ojec-run,nokiaS80-run,cdc-hi-run,open-profiler" description="Quick Run already built MIDlet suite."/>
<!--cldc-debug-->
<target name="cldc-debug" if="cldc-platform.trigger">
<parallel>
@@ -1053,27 +899,6 @@
</sequential>
</parallel>
</target>
- <!--ricoh-debug-->
- <target name="ricoh-debug" if="ricoh-platform.trigger">
- <copy todir="${platform.home}/mnt/sd3/sdk/dsdk/dist/${ricoh.application.uid}" overwrite="true">
- <fileset dir="${dist.dir}">
- <patternset refid="deployment.patternset"/>
- </fileset>
- <flattenmapper/>
- </copy>
- <parallel>
- <ant antfile="${platform.home}/startemulator_debug.xml" target="debug_emulator" dir="${platform.home}">
- <property name="emulator.skin" value="WVGA.xml"/>
- <property name="emulator.autolaunchid" value="${ricoh.application.uid}"/>
- </ant>
- <sequential>
- <sleep seconds="5"/>
- <property name="jpda.port" value="8000"/>
- <property name="debug.period" value="3000"/>
- <antcall target="nbdebug" inheritall="true" inheritrefs="true"/>
- </sequential>
- </parallel>
- </target>
<!--semc-debug-->
<!--semc-build-j9-debug-->
<target name="semc-build-j9-debug" if="semc-platform.trigger">
@@ -1153,8 +978,10 @@
<arg value="-Xrunjdwp:transport=dt_socket,address=${active.debug.port},server=y,suspend=y"/>
<arg value="-Xdebug"/>
</exec>
- <property name="debug.delay" value="500"/>
- <nb-mobility-debug address="${active.debug.port}" name="${app.codename}" delay="${debug.delay}" timeout="${debug.timeout}" period="2000"/>
+ <sequential>
+ <property name="debug.delay" value="500"/>
+ <nb-mobility-debug address="${active.debug.port}" name="${app.codename}" delay="${debug.delay}" timeout="${debug.timeout}" period="2000"/>
+ </sequential>
</parallel>
</target>
<target name="-post-cdc-hi-debug" if="cdc-hi-platform.trigger"/>
@@ -1177,16 +1004,12 @@
</sequential>
</parallel>
</target>
- <!--nsicom-debug-->
- <target name="nsicom-debug" if="nsicom-platform.trigger">
- <fail message="Debugging is not supported in this NSIcom VM version. Use monitoring facility instead!"/>
- </target>
<!--debug-->
<target name="remove-timestamp">
<delete file="$/.timestamp"/>
</target>
<target name="pre-debug"/>
- <target name="debug" description="Debug project." depends="clean,jar,remove-timestamp,pre-debug,cldc-debug,ricoh-debug,semc-debug,savaje-debug,sjmc-debug,ojec-debug,cdc-hi-debug,nokiaS80-debug,nsicom-debug"/>
+ <target name="debug" description="Debug project." depends="clean,jar,remove-timestamp,pre-debug,cldc-debug,semc-debug,savaje-debug,sjmc-debug,ojec-debug,cdc-hi-debug,nokiaS80-debug"/>
<target name="nbdebug" description="Start NetBeans debugger" if="netbeans.home">
<property name="debug.delay" value="5000"/>
<nb-mobility-debug address="${jpda.port}" name="${app.codename}" delay="${debug.delay}" timeout="${debug.timeout}" period="2000"/>
@@ -1275,12 +1098,6 @@
<target name="clean-j9" if="j9.dist">
<delete file="${j9.dist}"/>
</target>
- <target name="clean-ricoh" if="ricoh-platform.trigger">
- <delete dir="${platform.home}/mnt/sd3/sdk/dsdk/dist/${ricoh.application.uid}"/>
- <delete dir="${build.dir}/dalp"/>
- <delete file="${dist.dir}/${application.name}.dalp"/>
- <delete dir="${dist.dir}/lib"/>
- </target>
<target name="clean-semc" if="semc-platform.trigger">
<delete dir="${dist.dir}" includes="*.sis,*.SIS"/>
<delete dir="${platform.home}/epoc32/tools/ppro-custom-launcher/output/win32/PProLauncher${semc.application.uid}"/>
@@ -1359,7 +1176,7 @@
<delete dir="build" quiet="true"/>
<delete dir="dist" quiet="true"/>
</target>
- <target name="do-clean" depends="pre-clean,clean-timestamp,clean-preprocessed,clean-classes,clean-obfuscated,clean-preverified,clean-manifest,clean-jar,clean-jad,clean-javadoc,clean-j9,clean-ricoh,clean-semc,clean-savaje,clean-sjmc,clean-ojec,-clean-default-configuration-root,-clean-configuration-root,-clean-completely,post-clean"/>
+ <target name="do-clean" depends="pre-clean,clean-timestamp,clean-preprocessed,clean-classes,clean-obfuscated,clean-preverified,clean-manifest,clean-jar,clean-jad,clean-javadoc,clean-j9,clean-semc,clean-savaje,clean-sjmc,clean-ojec,-clean-default-configuration-root,-clean-configuration-root,-clean-completely,post-clean"/>
<target name="clean" depends="conditional-clean" if="no.clean.before.build" description="Clean build products.">
<antcall target="do-clean" inheritall="true" inheritrefs="true"/>
</target>
=== modified file 'local/in/dhis-mobile/J2ME/HP/CHC/CHCForm1/nbproject/genfiles.properties'
--- local/in/dhis-mobile/J2ME/HP/CHC/CHCForm1/nbproject/genfiles.properties 2012-05-23 13:55:43 +0000
+++ local/in/dhis-mobile/J2ME/HP/CHC/CHCForm1/nbproject/genfiles.properties 2012-10-06 11:36:56 +0000
@@ -4,5 +4,5 @@
build.xml.script.CRC32=55c34314
build.xml.stylesheet.CRC32=9c6a911d
nbproject/build-impl.xml.data.CRC32=8a21a39d
-nbproject/build-impl.xml.script.CRC32=0c41a481
-nbproject/build-impl.xml.stylesheet.CRC32=7a0aeb65
+nbproject/build-impl.xml.script.CRC32=3d3e9492
+nbproject/build-impl.xml.stylesheet.CRC32=e46c2d22
=== modified file 'local/in/dhis-mobile/J2ME/HP/CHC/CHCForm1/nbproject/private/private.properties'
--- local/in/dhis-mobile/J2ME/HP/CHC/CHCForm1/nbproject/private/private.properties 2012-05-23 13:55:43 +0000
+++ local/in/dhis-mobile/J2ME/HP/CHC/CHCForm1/nbproject/private/private.properties 2012-10-06 11:36:56 +0000
@@ -1,8 +1,8 @@
-#Wed, 02 May 2012 10:31:12 +0530
+#Sat, 06 Oct 2012 18:03:39 +0700
#Sat Jun 26 20:02:35 IST 2010
-netbeans.user=C:\\Users\\Long\\.netbeans\\7.0
+netbeans.user=C\:\\Users\\Thai Chuong\\.netbeans\\7.1
javadoc.preview=true
config.active=
-deployment.counter=349
+deployment.counter=351
app-version.autoincrement=true
-deployment.number=0.3.48
+deployment.number=0.3.50
=== modified file 'local/in/dhis-mobile/J2ME/HP/CHC/CHCForm1/nbproject/private/private.xml'
--- local/in/dhis-mobile/J2ME/HP/CHC/CHCForm1/nbproject/private/private.xml 2012-05-23 06:15:36 +0000
+++ local/in/dhis-mobile/J2ME/HP/CHC/CHCForm1/nbproject/private/private.xml 2012-10-06 11:36:56 +0000
@@ -6,4 +6,7 @@
<line>463</line>
</file>
</editor-bookmarks>
+ <open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/1">
+ <file>file:/D:/DHIS%20trunk/local/in/dhis-mobile/J2ME/HP/CHC/CHCForm1/src/org/hispindia/mobile/SCForm1.java</file>
+ </open-files>
</project-private>
=== modified file 'local/in/dhis-mobile/J2ME/HP/CHC/CHCForm1/src/org/hispindia/mobile/SCForm1.java'
--- local/in/dhis-mobile/J2ME/HP/CHC/CHCForm1/src/org/hispindia/mobile/SCForm1.java 2012-05-23 06:15:36 +0000
+++ local/in/dhis-mobile/J2ME/HP/CHC/CHCForm1/src/org/hispindia/mobile/SCForm1.java 2012-10-06 11:36:56 +0000
@@ -16,7 +16,7 @@
import javax.wireless.messaging.TextMessage;
import org.netbeans.microedition.lcdui.SplashScreen;
-public class SCForm1 extends MIDlet implements CommandListener {
+public class SCForm1 extends MIDlet implements CommandListener, ItemStateListener {
private boolean midletPaused = false;
private boolean editingLastReport = false;
@@ -2189,6 +2189,10 @@
Childhooddiseases05yrs.addCommand(getChildhooddiseases05yrsokcmd());
Childhooddiseases05yrs.setCommandListener(this);//GEN-END:|774-getter|1|774-postInit
// write post-init user code here
+ if ( Childhooddiseases05yrs instanceof Form )
+ {
+ ((Form) Childhooddiseases05yrs).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|774-getter|2|
return Childhooddiseases05yrs;
}
@@ -2208,6 +2212,10 @@
BlindnessControlProgramme.addCommand(getBlindnessControlProgrammeokcmd());
BlindnessControlProgramme.setCommandListener(this);//GEN-END:|775-getter|1|775-postInit
// write post-init user code here
+ if ( BlindnessControlProgramme instanceof Form )
+ {
+ ((Form) BlindnessControlProgramme).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|775-getter|2|
return BlindnessControlProgramme;
}
@@ -2227,6 +2235,10 @@
PatientServices.addCommand(getPatientServicesokcmd());
PatientServices.setCommandListener(this);//GEN-END:|784-getter|1|784-postInit
// write post-init user code here
+ if ( PatientServices instanceof Form )
+ {
+ ((Form) PatientServices).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|784-getter|2|
return PatientServices;
}
@@ -2246,6 +2258,10 @@
InPatientAdmissions.addCommand(getInPatientAdmissionsokcmd());
InPatientAdmissions.setCommandListener(this);//GEN-END:|789-getter|1|789-postInit
// write post-init user code here
+ if ( InPatientAdmissions instanceof Form )
+ {
+ ((Form) InPatientAdmissions).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|789-getter|2|
return InPatientAdmissions;
}
@@ -2265,6 +2281,10 @@
LaboratoryTesting.addCommand(getLaboratoryTestingokcmd());
LaboratoryTesting.setCommandListener(this);//GEN-END:|794-getter|1|794-postInit
// write post-init user code here
+ if ( LaboratoryTesting instanceof Form )
+ {
+ ((Form) LaboratoryTesting).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|794-getter|2|
return LaboratoryTesting;
}
@@ -2762,6 +2782,10 @@
PSDeaths.addCommand(getPsDeathsokcmd());
PSDeaths.setCommandListener(this);//GEN-END:|822-getter|1|822-postInit
// write post-init user code here
+ if ( PSDeaths instanceof Form )
+ {
+ ((Form) PSDeaths).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|822-getter|2|
return PSDeaths;
}
@@ -2782,6 +2806,10 @@
InPatientHeadCountatmidnight.addCommand(getInPatientHeadCountatmidnightokcmd());
InPatientHeadCountatmidnight.setCommandListener(this);//GEN-END:|823-getter|1|823-postInit
// write post-init user code here
+ if ( InPatientHeadCountatmidnight instanceof Form )
+ {
+ ((Form) InPatientHeadCountatmidnight).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|823-getter|2|
return InPatientHeadCountatmidnight;
}
@@ -2801,6 +2829,10 @@
OperationTheatre.addCommand(getOperationTheatreokcmd());
OperationTheatre.setCommandListener(this);//GEN-END:|824-getter|1|824-postInit
// write post-init user code here
+ if ( OperationTheatre instanceof Form )
+ {
+ ((Form) OperationTheatre).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|824-getter|2|
return OperationTheatre;
}
@@ -2820,6 +2852,10 @@
OthersDenlOphAYUSHetc.addCommand(getOthersetcokcmd());
OthersDenlOphAYUSHetc.setCommandListener(this);//GEN-END:|825-getter|1|825-postInit
// write post-init user code here
+ if ( OthersDenlOphAYUSHetc instanceof Form )
+ {
+ ((Form) OthersDenlOphAYUSHetc).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|825-getter|2|
return OthersDenlOphAYUSHetc;
}
@@ -2839,6 +2875,10 @@
Widaltestsconducted.addCommand(getWidaltestsconductedokcmd());
Widaltestsconducted.setCommandListener(this);//GEN-END:|826-getter|1|826-postInit
// write post-init user code here
+ if ( Widaltestsconducted instanceof Form )
+ {
+ ((Form) Widaltestsconducted).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|826-getter|2|
return Widaltestsconducted;
}
@@ -2858,6 +2898,10 @@
VDRLtestsconducted.addCommand(getVDRLtestsconductedokcmd());
VDRLtestsconducted.setCommandListener(this);//GEN-END:|847-getter|1|847-postInit
// write post-init user code here
+ if ( VDRLtestsconducted instanceof Form )
+ {
+ ((Form) VDRLtestsconducted).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|847-getter|2|
return VDRLtestsconducted;
}
@@ -2877,6 +2921,10 @@
Malariatestsconducted.addCommand(getMalariatestsconductedokcmd());
Malariatestsconducted.setCommandListener(this);//GEN-END:|848-getter|1|848-postInit
// write post-init user code here
+ if ( Malariatestsconducted instanceof Form )
+ {
+ ((Form) Malariatestsconducted).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|848-getter|2|
return Malariatestsconducted;
}
@@ -4043,6 +4091,10 @@
Outputpatient.addCommand(getOutputPatientCmd());
Outputpatient.setCommandListener(this);//GEN-END:|992-getter|1|992-postInit
// write post-init user code here
+ if ( Outputpatient instanceof Form )
+ {
+ ((Form) Outputpatient).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|992-getter|2|
return Outputpatient;
}
@@ -4095,6 +4147,10 @@
HIVtestsconducted.addCommand(getHIVtestsconductedCmd());
HIVtestsconducted.setCommandListener(this);//GEN-END:|1001-getter|1|1001-postInit
// write post-init user code here
+ if ( HIVtestsconducted instanceof Form )
+ {
+ ((Form) HIVtestsconducted).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|1001-getter|2|
return HIVtestsconducted;
}
@@ -4771,4 +4827,93 @@
}
return true;
}
+
+
+ /*
+ * Author: Thai Chuong Oct. 6th 2012
+ */
+ private boolean valueValidation(TextField myTextField, String[] mylist){
+ for (int i = 0; i < mylist.length; i++)
+ {
+ if (myTextField.getString().equalsIgnoreCase( mylist[i] ))
+ return false;
+ }
+ return true;
+
+ }
+
+ private void Validation (Item item, TextField myTextField){
+ if (item == myTextField)
+ {
+ String[] list = {"00"};
+ if(!valueValidation(myTextField, list) || (myTextField.getString().length() > 1 && Integer.parseInt(myTextField.getString()) == 0))
+ {
+ myTextField.setString( "" );
+ Alert myAlert = new Alert("Wrong data","not allow!",null,AlertType.INFO);
+ myAlert.setTimeout(1500);
+ Display.getDisplay(this).setCurrent(myAlert,getDisplay().getCurrent());
+ }
+ }
+ }
+
+ /*
+ * Author: Thai Chuong Oct. 6th 2012
+ */
+ public void itemStateChanged( Item item )
+ {
+ Validation(item, textField);
+ Validation(item, textField1);
+ Validation(item, textField2);
+ Validation(item, textField3);
+ Validation(item, textField4);
+ Validation(item, textField5);
+ Validation(item, textField6);
+ Validation(item, textField7);
+ Validation(item, textField8);
+ Validation(item, textField9);
+
+ Validation(item, textField11);
+
+ Validation(item, textField20);
+ Validation(item, textField21);
+ Validation(item, textField22);
+ Validation(item, textField23);
+ Validation(item, textField24);
+ Validation(item, textField25);
+ Validation(item, textField26);
+ Validation(item, textField27);
+ Validation(item, textField28);
+ Validation(item, textField29);
+ Validation(item, textField30);
+ Validation(item, textField31);
+ Validation(item, textField32);
+ Validation(item, textField33);
+ Validation(item, textField34);
+ Validation(item, textField35);
+
+ Validation(item, textField37);
+
+ Validation(item, textField40);
+ Validation(item, textField41);
+ Validation(item, textField42);
+ Validation(item, textField43);
+ Validation(item, textField44);
+ Validation(item, textField45);
+ Validation(item, textField46);
+ Validation(item, textField47);
+ Validation(item, textField48);
+ Validation(item, textField49);
+ Validation(item, textField50);
+ Validation(item, textField51);
+ Validation(item, textField52);
+ Validation(item, textField53);
+
+ Validation(item, textField58);
+ Validation(item, textField59);
+ Validation(item, textField60);
+ Validation(item, textField61);
+ Validation(item, textField61);
+ Validation(item, textField63);
+ Validation(item, textField64);
+ }
}
\ No newline at end of file
=== modified file 'local/in/dhis-mobile/J2ME/HP/CHC/CHCForm1/src/org/hispindia/mobile/SCForm1.vmd'
--- local/in/dhis-mobile/J2ME/HP/CHC/CHCForm1/src/org/hispindia/mobile/SCForm1.vmd 2012-05-23 06:15:36 +0000
+++ local/in/dhis-mobile/J2ME/HP/CHC/CHCForm1/src/org/hispindia/mobile/SCForm1.vmd 2012-10-06 11:36:56 +0000
@@ -1356,18 +1356,18 @@
<Property name="label" typeID="Pjava.lang.String" value="VOk"/>
<Property name="type" typeID="Pint" value="V4"/>
</Component>
+ <Component componentID="662" typeID="Cjavax.microedition.lcdui.Command">
+ <Property name="instanceName" typeID="Pjava.lang.String" value="VvitaminadoseBackCmd"/>
+ <Property name="codeGenerated" typeID="Pboolean" value="Vtrue"/>
+ <Property name="label" typeID="Pjava.lang.String" value="VBack"/>
+ <Property name="type" typeID="Pint" value="V2"/>
+ </Component>
<Component componentID="176" typeID="C#SplashScreenDismissCommand">
<Property name="label" typeID="Pjava.lang.String" value="VDismiss"/>
<Property name="type" typeID="Pint" value="V4"/>
<Property name="priority" typeID="Pint" value="V0"/>
<Property name="ordinary" typeID="Pboolean" value="Vfalse"/>
</Component>
- <Component componentID="662" typeID="Cjavax.microedition.lcdui.Command">
- <Property name="instanceName" typeID="Pjava.lang.String" value="VvitaminadoseBackCmd"/>
- <Property name="codeGenerated" typeID="Pboolean" value="Vtrue"/>
- <Property name="label" typeID="Pjava.lang.String" value="VBack"/>
- <Property name="type" typeID="Pint" value="V2"/>
- </Component>
<Component componentID="745" typeID="Cjavax.microedition.lcdui.Command">
<Property name="instanceName" typeID="Pjava.lang.String" value="VCsectiondeliveriesokcmd"/>
<Property name="codeGenerated" typeID="Pboolean" value="Vtrue"/>
@@ -1464,18 +1464,18 @@
<Property name="label" typeID="Pjava.lang.String" value="VBack"/>
<Property name="type" typeID="Pint" value="V2"/>
</Component>
+ <Component componentID="709" typeID="Cjavax.microedition.lcdui.Command">
+ <Property name="instanceName" typeID="Pjava.lang.String" value="VmenstrualhygieneprogrammeCmd"/>
+ <Property name="codeGenerated" typeID="Pboolean" value="Vtrue"/>
+ <Property name="label" typeID="Pjava.lang.String" value="VNext"/>
+ <Property name="type" typeID="Pint" value="V4"/>
+ </Component>
<Component componentID="227" typeID="Cjavax.microedition.lcdui.Command">
<Property name="instanceName" typeID="Pjava.lang.String" value="VloadExitCmd"/>
<Property name="codeGenerated" typeID="Pboolean" value="Vtrue"/>
<Property name="label" typeID="Pjava.lang.String" value="VExit"/>
<Property name="type" typeID="Pint" value="V7"/>
</Component>
- <Component componentID="709" typeID="Cjavax.microedition.lcdui.Command">
- <Property name="instanceName" typeID="Pjava.lang.String" value="VmenstrualhygieneprogrammeCmd"/>
- <Property name="codeGenerated" typeID="Pboolean" value="Vtrue"/>
- <Property name="label" typeID="Pjava.lang.String" value="VNext"/>
- <Property name="type" typeID="Pint" value="V4"/>
- </Component>
<Component componentID="225" typeID="Cjavax.microedition.lcdui.Command">
<Property name="instanceName" typeID="Pjava.lang.String" value="VloadCmd"/>
<Property name="codeGenerated" typeID="Pboolean" value="Vtrue"/>
@@ -1734,18 +1734,18 @@
<Property name="label" typeID="Pjava.lang.String" value="VBack"/>
<Property name="type" typeID="Pint" value="V2"/>
</Component>
+ <Component componentID="1004" typeID="Cjavax.microedition.lcdui.Command">
+ <Property name="instanceName" typeID="Pjava.lang.String" value="VHIVtestsconductedCmd"/>
+ <Property name="codeGenerated" typeID="Pboolean" value="Vtrue"/>
+ <Property name="label" typeID="Pjava.lang.String" value="VOk"/>
+ <Property name="type" typeID="Pint" value="V4"/>
+ </Component>
<Component componentID="458" typeID="Cjavax.microedition.lcdui.Command">
<Property name="instanceName" typeID="Pjava.lang.String" value="VmonthExitCmd"/>
<Property name="codeGenerated" typeID="Pboolean" value="Vtrue"/>
<Property name="label" typeID="Pjava.lang.String" value="VExit"/>
<Property name="type" typeID="Pint" value="V7"/>
</Component>
- <Component componentID="1004" typeID="Cjavax.microedition.lcdui.Command">
- <Property name="instanceName" typeID="Pjava.lang.String" value="VHIVtestsconductedCmd"/>
- <Property name="codeGenerated" typeID="Pboolean" value="Vtrue"/>
- <Property name="label" typeID="Pjava.lang.String" value="VOk"/>
- <Property name="type" typeID="Pint" value="V4"/>
- </Component>
<Component componentID="993" typeID="Cjavax.microedition.lcdui.Command">
<Property name="instanceName" typeID="Pjava.lang.String" value="VOutPatientbackCmd"/>
<Property name="codeGenerated" typeID="Pboolean" value="Vtrue"/>
@@ -1795,26 +1795,26 @@
</Component>
</Document>
<FlowScene version="1">
- <Node componentID="825" descriptorID="componentNode825" x="867" y="2401"/>
+ <Node componentID="794" descriptorID="componentNode794" x="583" y="2536"/>
+ <Node componentID="784" descriptorID="componentNode784" x="919" y="1553"/>
+ <Node componentID="992" descriptorID="componentNode992" x="663" y="2084"/>
+ <Node componentID="1001" descriptorID="componentNode1001" x="452" y="2683"/>
+ <Node componentID="167" descriptorID="componentNode167" x="93" y="337"/>
<Node componentID="2" descriptorID="componentNode2" x="97" y="10"/>
- <Node componentID="789" descriptorID="componentNode789" x="694" y="1659"/>
<Node componentID="775" descriptorID="componentNode775" x="567" y="1441"/>
- <Node componentID="822" descriptorID="componentNode822" x="561" y="1765"/>
- <Node componentID="1001" descriptorID="componentNode1001" x="452" y="2683"/>
- <Node componentID="724" descriptorID="componentNode724" x="644" y="41"/>
- <Node componentID="202" descriptorID="componentNode202" x="488" y="135"/>
- <Node componentID="167" descriptorID="componentNode167" x="93" y="337"/>
- <Node componentID="826" descriptorID="componentNode826" x="877" y="2786"/>
+ <Node componentID="825" descriptorID="componentNode825" x="867" y="2401"/>
<Node componentID="774" descriptorID="componentNode774" x="1091" y="1337"/>
<Node componentID="823" descriptorID="componentNode823" x="765" y="1855"/>
- <Node componentID="233" descriptorID="componentNode233" x="313" y="227"/>
+ <Node componentID="826" descriptorID="componentNode826" x="877" y="2786"/>
<Node componentID="848" descriptorID="componentNode848" x="268" y="3015"/>
- <Node componentID="219" descriptorID="componentNode219" x="377" y="-103"/>
- <Node componentID="992" descriptorID="componentNode992" x="663" y="2084"/>
- <Node componentID="794" descriptorID="componentNode794" x="583" y="2536"/>
<Node componentID="824" descriptorID="componentNode824" x="505" y="2309"/>
<Node componentID="847" descriptorID="componentNode847" x="560" y="2875"/>
- <Node componentID="784" descriptorID="componentNode784" x="919" y="1553"/>
+ <Node componentID="789" descriptorID="componentNode789" x="694" y="1659"/>
<Node componentID="178" descriptorID="componentNode178" x="865" y="177"/>
+ <Node componentID="233" descriptorID="componentNode233" x="313" y="227"/>
+ <Node componentID="202" descriptorID="componentNode202" x="488" y="135"/>
+ <Node componentID="724" descriptorID="componentNode724" x="644" y="41"/>
+ <Node componentID="822" descriptorID="componentNode822" x="561" y="1765"/>
+ <Node componentID="219" descriptorID="componentNode219" x="377" y="-103"/>
</FlowScene>
</VisualDesign>
=== modified file 'local/in/dhis-mobile/J2ME/HP/HMIS-CHC/SCForm1/nbproject/private/private.properties'
--- local/in/dhis-mobile/J2ME/HP/HMIS-CHC/SCForm1/nbproject/private/private.properties 2012-05-23 06:15:36 +0000
+++ local/in/dhis-mobile/J2ME/HP/HMIS-CHC/SCForm1/nbproject/private/private.properties 2012-10-06 11:36:56 +0000
@@ -1,8 +1,8 @@
-#Thu, 17 May 2012 11:21:59 +0530
+#Sat, 06 Oct 2012 17:48:04 +0700
#Sat Jun 26 20:02:35 IST 2010
-netbeans.user=C\:\\Users\\ARUNIMA\\.netbeans\\7.1
+netbeans.user=C\:\\Users\\Thai Chuong\\.netbeans\\7.1
javadoc.preview=true
config.active=
-deployment.counter=337
+deployment.counter=339
app-version.autoincrement=true
-deployment.number=0.3.36
+deployment.number=0.3.38
=== modified file 'local/in/dhis-mobile/J2ME/HP/HMIS-CHC/SCForm1/src/org/hispindia/mobile/SCForm1.java'
--- local/in/dhis-mobile/J2ME/HP/HMIS-CHC/SCForm1/src/org/hispindia/mobile/SCForm1.java 2012-05-23 06:15:36 +0000
+++ local/in/dhis-mobile/J2ME/HP/HMIS-CHC/SCForm1/src/org/hispindia/mobile/SCForm1.java 2012-10-06 11:36:56 +0000
@@ -16,7 +16,7 @@
import javax.wireless.messaging.TextMessage;
import org.netbeans.microedition.lcdui.SplashScreen;
-public class SCForm1 extends MIDlet implements CommandListener {
+public class SCForm1 extends MIDlet implements CommandListener, ItemStateListener {
private boolean midletPaused = false;
private boolean editingLastReport = false;
@@ -1503,6 +1503,10 @@
Antinatalcare.addCommand(getAntinatalcareBackCmd());
Antinatalcare.setCommandListener(this);//GEN-END:|473-getter|1|473-postInit
// write post-init user code here
+ if ( Antinatalcare instanceof Form )
+ {
+ ((Form) Antinatalcare).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|473-getter|2|
return Antinatalcare;
}
@@ -1522,6 +1526,10 @@
ANC_Services.addCommand(getANC_ServicesCmd());
ANC_Services.setCommandListener(this);//GEN-END:|518-getter|1|518-postInit
// write post-init user code here
+ if ( ANC_Services instanceof Form )
+ {
+ ((Form) ANC_Services).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|518-getter|2|
return ANC_Services;
}
@@ -1726,6 +1734,10 @@
Deliveries.addCommand(getDeliveriesCmd());
Deliveries.setCommandListener(this);//GEN-END:|533-getter|1|533-postInit
// write post-init user code here
+ if ( Deliveries instanceof Form )
+ {
+ ((Form) Deliveries).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|533-getter|2|
return Deliveries;
}
@@ -1858,6 +1870,10 @@
Pregnancyoutcome.addCommand(getPregnancyoutcomeCmd());
Pregnancyoutcome.setCommandListener(this);//GEN-END:|557-getter|1|557-postInit
// write post-init user code here
+ if ( Pregnancyoutcome instanceof Form )
+ {
+ ((Form) Pregnancyoutcome).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|557-getter|2|
return Pregnancyoutcome;
}
@@ -2010,6 +2026,10 @@
Newbornsweighted.addCommand(getNewbornsweightedCmd());
Newbornsweighted.setCommandListener(this);//GEN-END:|568-getter|1|568-postInit
// write post-init user code here
+ if ( Newbornsweighted instanceof Form )
+ {
+ ((Form) Newbornsweighted).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|568-getter|2|
return Newbornsweighted;
}
@@ -2112,6 +2132,10 @@
Complicatedpregnancies.addCommand(getPostnatalcareCmd());
Complicatedpregnancies.setCommandListener(this);//GEN-END:|578-getter|1|578-postInit
// write post-init user code here
+ if ( Complicatedpregnancies instanceof Form )
+ {
+ ((Form) Complicatedpregnancies).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|578-getter|2|
return Complicatedpregnancies;
}
@@ -2197,6 +2221,10 @@
Postnatalcare.addCommand(getFamilyplanningCmd());
Postnatalcare.setCommandListener(this);//GEN-END:|587-getter|1|587-postInit
// write post-init user code here
+ if ( Postnatalcare instanceof Form )
+ {
+ ((Form) Postnatalcare).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|587-getter|2|
return Postnatalcare;
}
@@ -2317,6 +2345,10 @@
Mtpsconducted.addCommand(getChildimmunizationCmd());
Mtpsconducted.setCommandListener(this);//GEN-END:|606-getter|1|606-postInit
// write post-init user code here
+ if ( Mtpsconducted instanceof Form )
+ {
+ ((Form) Mtpsconducted).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|606-getter|2|
return Mtpsconducted;
}
@@ -2479,6 +2511,10 @@
Familyplanning.addCommand(getAefiCmd());
Familyplanning.setCommandListener(this);//GEN-END:|642-getter|1|642-postInit
// write post-init user code here
+ if ( Familyplanning instanceof Form )
+ {
+ ((Form) Familyplanning).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|642-getter|2|
return Familyplanning;
}
@@ -2582,6 +2618,10 @@
Childimmu011months.addCommand(getImmunizationsessionsCmd());
Childimmu011months.setCommandListener(this);//GEN-END:|652-getter|1|652-postInit
// write post-init user code here
+ if ( Childimmu011months instanceof Form )
+ {
+ ((Form) Childimmu011months).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|652-getter|2|
return Childimmu011months;
}
@@ -2635,6 +2675,10 @@
Immu16months.addCommand(getVitaminadoseCmd());
Immu16months.setCommandListener(this);//GEN-END:|661-getter|1|661-postInit
// write post-init user code here
+ if ( Immu16months instanceof Form )
+ {
+ ((Form) Immu16months).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|661-getter|2|
return Immu16months;
}
@@ -2801,6 +2845,10 @@
AEFI.addCommand(getChildhoodCmd());
AEFI.setCommandListener(this);//GEN-END:|671-getter|1|671-postInit
// write post-init user code here
+ if ( AEFI instanceof Form )
+ {
+ ((Form) AEFI).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|671-getter|2|
return AEFI;
}
@@ -2903,6 +2951,10 @@
Immusessions.addCommand(getHealthfacilityservicesCmd());
Immusessions.setCommandListener(this);//GEN-END:|681-getter|1|681-postInit
// write post-init user code here
+ if ( Immusessions instanceof Form )
+ {
+ ((Form) Immusessions).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|681-getter|2|
return Immusessions;
}
@@ -2922,6 +2974,10 @@
Vitadose9mnt5yrs.addCommand(getLabtestsCmd());
Vitadose9mnt5yrs.setCommandListener(this);//GEN-END:|688-getter|1|688-postInit
// write post-init user code here
+ if ( Vitadose9mnt5yrs instanceof Form )
+ {
+ ((Form) Vitadose9mnt5yrs).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|688-getter|2|
return Vitadose9mnt5yrs;
}
@@ -3074,6 +3130,10 @@
Rtisticasestreated.addCommand(getFollowingimmunizationCmd());
Rtisticasestreated.setCommandListener(this);//GEN-END:|627-getter|1|627-postInit
// write post-init user code here
+ if ( Rtisticasestreated instanceof Form )
+ {
+ ((Form) Rtisticasestreated).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|627-getter|2|
return Rtisticasestreated;
}
@@ -4576,4 +4636,127 @@
}
return true;
}
+
+
+ /*
+ * Author: Thai Chuong Oct. 6th 2012
+ */
+ private boolean valueValidation(TextField myTextField, String[] mylist){
+ for (int i = 0; i < mylist.length; i++)
+ {
+ if (myTextField.getString().equalsIgnoreCase( mylist[i] ))
+ return false;
+ }
+ return true;
+
+ }
+
+ private void Validation (Item item, TextField myTextField){
+ if (item == myTextField)
+ {
+ String[] list = {"00"};
+ if(!valueValidation(myTextField, list) || (myTextField.getString().length() > 1 && Integer.parseInt(myTextField.getString()) == 0))
+ {
+ myTextField.setString( "" );
+ Alert myAlert = new Alert("Wrong data","not allow!",null,AlertType.INFO);
+ myAlert.setTimeout(1500);
+ Display.getDisplay(this).setCurrent(myAlert,getDisplay().getCurrent());
+ }
+ }
+ }
+
+ /*
+ * Author: Thai Chuong Oct. 6th 2012
+ */
+ public void itemStateChanged( Item item )
+ {
+ Validation(item, textField);
+ Validation(item, textField1);
+ Validation(item, textField2);
+ Validation(item, textField3);
+ Validation(item, textField4);
+ Validation(item, textField5);
+ Validation(item, textField6);
+ Validation(item, textField7);
+ Validation(item, textField8);
+ Validation(item, textField9);
+ Validation(item, textField10);
+ Validation(item, textField11);
+ Validation(item, textField12);
+ Validation(item, textField13);
+ Validation(item, textField14);
+ Validation(item, textField15);
+ Validation(item, textField16);
+ Validation(item, textField17);
+ Validation(item, textField18);
+ Validation(item, textField19);
+ Validation(item, textField20);
+ Validation(item, textField21);
+ Validation(item, textField22);
+ Validation(item, textField23);
+ Validation(item, textField24);
+ Validation(item, textField25);
+ Validation(item, textField26);
+ Validation(item, textField27);
+ Validation(item, textField28);
+ Validation(item, textField29);
+ Validation(item, textField30);
+ Validation(item, textField31);
+ Validation(item, textField32);
+ Validation(item, textField33);
+ Validation(item, textField34);
+ Validation(item, textField35);
+ Validation(item, textField36);
+ Validation(item, textField37);
+ Validation(item, textField38);
+ Validation(item, textField39);
+ Validation(item, textField40);
+ Validation(item, textField41);
+ Validation(item, textField42);
+ Validation(item, textField43);
+ Validation(item, textField44);
+ Validation(item, textField45);
+ Validation(item, textField46);
+ Validation(item, textField47);
+ Validation(item, textField48);
+ Validation(item, textField49);
+ Validation(item, textField50);
+ Validation(item, textField51);
+ Validation(item, textField52);
+ Validation(item, textField53);
+ Validation(item, textField54);
+ Validation(item, textField55);
+ Validation(item, textField56);
+ Validation(item, textField57);
+ Validation(item, textField58);
+ Validation(item, textField59);
+ Validation(item, textField60);
+ Validation(item, textField61);
+ Validation(item, textField61);
+ Validation(item, textField63);
+ Validation(item, textField64);
+ Validation(item, textField65);
+ Validation(item, textField66);
+ Validation(item, textField67);
+ Validation(item, textField68);
+ Validation(item, textField69);
+ Validation(item, textField70);
+ Validation(item, textField71);
+ Validation(item, textField72);
+ Validation(item, textField73);
+ Validation(item, textField74);
+ Validation(item, textField75);
+ Validation(item, textField76);
+ Validation(item, textField77);
+ Validation(item, textField78);
+ Validation(item, textField79);
+ Validation(item, textField80);
+ Validation(item, textField81);
+ Validation(item, textField82);
+ Validation(item, textField83);
+ Validation(item, textField84);
+ Validation(item, textField85);
+ Validation(item, textField86);
+ Validation(item, textField87);
+ }
}
\ No newline at end of file
=== modified file 'local/in/dhis-mobile/J2ME/HP/HMIS-CHC/SCForm1/src/org/hispindia/mobile/SCForm1.vmd'
--- local/in/dhis-mobile/J2ME/HP/HMIS-CHC/SCForm1/src/org/hispindia/mobile/SCForm1.vmd 2012-05-23 06:15:36 +0000
+++ local/in/dhis-mobile/J2ME/HP/HMIS-CHC/SCForm1/src/org/hispindia/mobile/SCForm1.vmd 2012-10-06 11:36:56 +0000
@@ -1740,18 +1740,18 @@
<Property name="label" typeID="Pjava.lang.String" value="VOk"/>
<Property name="type" typeID="Pint" value="V4"/>
</Component>
+ <Component componentID="662" typeID="Cjavax.microedition.lcdui.Command">
+ <Property name="instanceName" typeID="Pjava.lang.String" value="VvitaminadoseBackCmd"/>
+ <Property name="codeGenerated" typeID="Pboolean" value="Vtrue"/>
+ <Property name="label" typeID="Pjava.lang.String" value="VBack"/>
+ <Property name="type" typeID="Pint" value="V2"/>
+ </Component>
<Component componentID="176" typeID="C#SplashScreenDismissCommand">
<Property name="label" typeID="Pjava.lang.String" value="VDismiss"/>
<Property name="type" typeID="Pint" value="V4"/>
<Property name="priority" typeID="Pint" value="V0"/>
<Property name="ordinary" typeID="Pboolean" value="Vfalse"/>
</Component>
- <Component componentID="662" typeID="Cjavax.microedition.lcdui.Command">
- <Property name="instanceName" typeID="Pjava.lang.String" value="VvitaminadoseBackCmd"/>
- <Property name="codeGenerated" typeID="Pboolean" value="Vtrue"/>
- <Property name="label" typeID="Pjava.lang.String" value="VBack"/>
- <Property name="type" typeID="Pint" value="V2"/>
- </Component>
<Component componentID="206" typeID="Cjavax.microedition.lcdui.Command">
<Property name="instanceName" typeID="Pjava.lang.String" value="VsendExitCmd"/>
<Property name="codeGenerated" typeID="Pboolean" value="Vtrue"/>
@@ -1770,18 +1770,18 @@
<Property name="label" typeID="Pjava.lang.String" value="VBack"/>
<Property name="type" typeID="Pint" value="V2"/>
</Component>
+ <Component componentID="709" typeID="Cjavax.microedition.lcdui.Command">
+ <Property name="instanceName" typeID="Pjava.lang.String" value="VmenstrualhygieneprogrammeCmd"/>
+ <Property name="codeGenerated" typeID="Pboolean" value="Vtrue"/>
+ <Property name="label" typeID="Pjava.lang.String" value="VNext"/>
+ <Property name="type" typeID="Pint" value="V4"/>
+ </Component>
<Component componentID="227" typeID="Cjavax.microedition.lcdui.Command">
<Property name="instanceName" typeID="Pjava.lang.String" value="VloadExitCmd"/>
<Property name="codeGenerated" typeID="Pboolean" value="Vtrue"/>
<Property name="label" typeID="Pjava.lang.String" value="VExit"/>
<Property name="type" typeID="Pint" value="V7"/>
</Component>
- <Component componentID="709" typeID="Cjavax.microedition.lcdui.Command">
- <Property name="instanceName" typeID="Pjava.lang.String" value="VmenstrualhygieneprogrammeCmd"/>
- <Property name="codeGenerated" typeID="Pboolean" value="Vtrue"/>
- <Property name="label" typeID="Pjava.lang.String" value="VNext"/>
- <Property name="type" typeID="Pint" value="V4"/>
- </Component>
<Component componentID="225" typeID="Cjavax.microedition.lcdui.Command">
<Property name="instanceName" typeID="Pjava.lang.String" value="VloadCmd"/>
<Property name="codeGenerated" typeID="Pboolean" value="Vtrue"/>
@@ -1885,27 +1885,27 @@
</Component>
</Document>
<FlowScene version="1">
+ <Node componentID="681" descriptorID="componentNode681" x="41" y="1630"/>
+ <Node componentID="606" descriptorID="componentNode606" x="45" y="869"/>
+ <Node componentID="578" descriptorID="componentNode578" x="7" y="619"/>
+ <Node componentID="568" descriptorID="componentNode568" x="165" y="513"/>
<Node componentID="178" descriptorID="componentNode178" x="1188" y="181"/>
+ <Node componentID="557" descriptorID="componentNode557" x="30" y="372"/>
+ <Node componentID="627" descriptorID="componentNode627" x="215" y="999"/>
+ <Node componentID="688" descriptorID="componentNode688" x="288" y="1735"/>
+ <Node componentID="233" descriptorID="componentNode233" x="497" y="373"/>
+ <Node componentID="671" descriptorID="componentNode671" x="245" y="1482"/>
+ <Node componentID="642" descriptorID="componentNode642" x="40" y="1121"/>
+ <Node componentID="202" descriptorID="componentNode202" x="1188" y="521"/>
<Node componentID="661" descriptorID="componentNode661" x="40" y="1344"/>
- <Node componentID="681" descriptorID="componentNode681" x="41" y="1630"/>
- <Node componentID="642" descriptorID="componentNode642" x="40" y="1121"/>
+ <Node componentID="473" descriptorID="componentNode473" x="504" y="508"/>
+ <Node componentID="219" descriptorID="componentNode219" x="710" y="546"/>
+ <Node componentID="2" descriptorID="componentNode2" x="954" y="375"/>
<Node componentID="587" descriptorID="componentNode587" x="193" y="757"/>
- <Node componentID="219" descriptorID="componentNode219" x="710" y="546"/>
- <Node componentID="473" descriptorID="componentNode473" x="504" y="508"/>
- <Node componentID="724" descriptorID="componentNode724" x="1190" y="650"/>
- <Node componentID="671" descriptorID="componentNode671" x="245" y="1482"/>
+ <Node componentID="652" descriptorID="componentNode652" x="206" y="1240"/>
<Node componentID="167" descriptorID="componentNode167" x="766" y="181"/>
- <Node componentID="557" descriptorID="componentNode557" x="30" y="372"/>
- <Node componentID="568" descriptorID="componentNode568" x="165" y="513"/>
- <Node componentID="202" descriptorID="componentNode202" x="1188" y="521"/>
<Node componentID="533" descriptorID="componentNode533" x="-66" y="219"/>
- <Node componentID="606" descriptorID="componentNode606" x="45" y="869"/>
- <Node componentID="688" descriptorID="componentNode688" x="288" y="1735"/>
- <Node componentID="652" descriptorID="componentNode652" x="206" y="1240"/>
- <Node componentID="2" descriptorID="componentNode2" x="954" y="375"/>
- <Node componentID="578" descriptorID="componentNode578" x="7" y="619"/>
- <Node componentID="627" descriptorID="componentNode627" x="215" y="999"/>
- <Node componentID="233" descriptorID="componentNode233" x="497" y="373"/>
+ <Node componentID="724" descriptorID="componentNode724" x="1190" y="650"/>
<Node componentID="518" descriptorID="componentNode518" x="80" y="94"/>
</FlowScene>
</VisualDesign>
=== modified file 'local/in/dhis-mobile/J2ME/HP/HMIS-PHC/SCForm1/nbproject/private/private.properties'
--- local/in/dhis-mobile/J2ME/HP/HMIS-PHC/SCForm1/nbproject/private/private.properties 2012-05-23 06:15:36 +0000
+++ local/in/dhis-mobile/J2ME/HP/HMIS-PHC/SCForm1/nbproject/private/private.properties 2012-10-06 11:36:56 +0000
@@ -1,8 +1,8 @@
-#Fri, 11 May 2012 12:29:13 +0530
+#Sat, 06 Oct 2012 18:12:52 +0700
#Sat Jun 26 20:02:35 IST 2010
-netbeans.user=C\:\\Users\\ARUNIMA\\.netbeans\\7.1
+netbeans.user=C\:\\Users\\Thai Chuong\\.netbeans\\7.1
javadoc.preview=true
config.active=
-deployment.counter=337
+deployment.counter=339
app-version.autoincrement=true
-deployment.number=0.3.36
+deployment.number=0.3.38
=== modified file 'local/in/dhis-mobile/J2ME/HP/HMIS-PHC/SCForm1/nbproject/private/private.xml'
--- local/in/dhis-mobile/J2ME/HP/HMIS-PHC/SCForm1/nbproject/private/private.xml 2012-05-23 06:15:36 +0000
+++ local/in/dhis-mobile/J2ME/HP/HMIS-PHC/SCForm1/nbproject/private/private.xml 2012-10-06 11:36:56 +0000
@@ -6,4 +6,7 @@
<line>378</line>
</file>
</editor-bookmarks>
+ <open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/1">
+ <file>file:/D:/DHIS%20trunk/local/in/dhis-mobile/J2ME/HP/HMIS-PHC/SCForm1/src/org/hispindia/mobile/SCForm1.java</file>
+ </open-files>
</project-private>
=== modified file 'local/in/dhis-mobile/J2ME/HP/HMIS-PHC/SCForm1/src/org/hispindia/mobile/SCForm1.java'
--- local/in/dhis-mobile/J2ME/HP/HMIS-PHC/SCForm1/src/org/hispindia/mobile/SCForm1.java 2012-05-23 06:15:36 +0000
+++ local/in/dhis-mobile/J2ME/HP/HMIS-PHC/SCForm1/src/org/hispindia/mobile/SCForm1.java 2012-10-06 11:36:56 +0000
@@ -16,7 +16,7 @@
import javax.wireless.messaging.TextMessage;
import org.netbeans.microedition.lcdui.SplashScreen;
-public class SCForm1 extends MIDlet implements CommandListener {
+public class SCForm1 extends MIDlet implements CommandListener, ItemStateListener {
private boolean midletPaused = false;
private boolean editingLastReport = false;
@@ -1501,6 +1501,10 @@
Antinatalcare.addCommand(getAntinatalcareBackCmd());
Antinatalcare.setCommandListener(this);//GEN-END:|473-getter|1|473-postInit
// write post-init user code here
+ if ( Antinatalcare instanceof Form )
+ {
+ ((Form) Antinatalcare).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|473-getter|2|
return Antinatalcare;
}
@@ -1520,6 +1524,10 @@
ANC_Services.addCommand(getANC_ServicesCmd());
ANC_Services.setCommandListener(this);//GEN-END:|518-getter|1|518-postInit
// write post-init user code here
+ if ( ANC_Services instanceof Form )
+ {
+ ((Form) ANC_Services).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|518-getter|2|
return ANC_Services;
}
@@ -1724,6 +1732,10 @@
Deliveries.addCommand(getDeliveriesCmd());
Deliveries.setCommandListener(this);//GEN-END:|533-getter|1|533-postInit
// write post-init user code here
+ if ( Deliveries instanceof Form )
+ {
+ ((Form) Deliveries).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|533-getter|2|
return Deliveries;
}
@@ -1856,6 +1868,10 @@
Pregnancyoutcome.addCommand(getPregnancyoutcomeCmd());
Pregnancyoutcome.setCommandListener(this);//GEN-END:|557-getter|1|557-postInit
// write post-init user code here
+ if ( Pregnancyoutcome instanceof Form )
+ {
+ ((Form) Pregnancyoutcome).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|557-getter|2|
return Pregnancyoutcome;
}
@@ -2008,6 +2024,10 @@
Newbornsweighted.addCommand(getNewbornsweightedCmd());
Newbornsweighted.setCommandListener(this);//GEN-END:|568-getter|1|568-postInit
// write post-init user code here
+ if ( Newbornsweighted instanceof Form )
+ {
+ ((Form) Newbornsweighted).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|568-getter|2|
return Newbornsweighted;
}
@@ -2110,6 +2130,10 @@
Complicatedpregnancies.addCommand(getPostnatalcareCmd());
Complicatedpregnancies.setCommandListener(this);//GEN-END:|578-getter|1|578-postInit
// write post-init user code here
+ if ( Complicatedpregnancies instanceof Form )
+ {
+ ((Form) Complicatedpregnancies).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|578-getter|2|
return Complicatedpregnancies;
}
@@ -2195,6 +2219,10 @@
Postnatalcare.addCommand(getFamilyplanningCmd());
Postnatalcare.setCommandListener(this);//GEN-END:|587-getter|1|587-postInit
// write post-init user code here
+ if ( Postnatalcare instanceof Form )
+ {
+ ((Form) Postnatalcare).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|587-getter|2|
return Postnatalcare;
}
@@ -2315,6 +2343,10 @@
Mtpsconducted.addCommand(getChildimmunizationCmd());
Mtpsconducted.setCommandListener(this);//GEN-END:|606-getter|1|606-postInit
// write post-init user code here
+ if ( Mtpsconducted instanceof Form )
+ {
+ ((Form) Mtpsconducted).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|606-getter|2|
return Mtpsconducted;
}
@@ -2477,6 +2509,10 @@
Familyplanning.addCommand(getAefiCmd());
Familyplanning.setCommandListener(this);//GEN-END:|642-getter|1|642-postInit
// write post-init user code here
+ if ( Familyplanning instanceof Form )
+ {
+ ((Form) Familyplanning).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|642-getter|2|
return Familyplanning;
}
@@ -2580,6 +2616,10 @@
Childimmu011months.addCommand(getImmunizationsessionsCmd());
Childimmu011months.setCommandListener(this);//GEN-END:|652-getter|1|652-postInit
// write post-init user code here
+ if ( Childimmu011months instanceof Form )
+ {
+ ((Form) Childimmu011months).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|652-getter|2|
return Childimmu011months;
}
@@ -2633,6 +2673,10 @@
Immu16months.addCommand(getVitaminadoseCmd());
Immu16months.setCommandListener(this);//GEN-END:|661-getter|1|661-postInit
// write post-init user code here
+ if ( Immu16months instanceof Form )
+ {
+ ((Form) Immu16months).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|661-getter|2|
return Immu16months;
}
@@ -2799,6 +2843,10 @@
AEFI.addCommand(getChildhoodCmd());
AEFI.setCommandListener(this);//GEN-END:|671-getter|1|671-postInit
// write post-init user code here
+ if ( AEFI instanceof Form )
+ {
+ ((Form) AEFI).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|671-getter|2|
return AEFI;
}
@@ -2901,6 +2949,10 @@
Immusessions.addCommand(getHealthfacilityservicesCmd());
Immusessions.setCommandListener(this);//GEN-END:|681-getter|1|681-postInit
// write post-init user code here
+ if ( Immusessions instanceof Form )
+ {
+ ((Form) Immusessions).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|681-getter|2|
return Immusessions;
}
@@ -2920,6 +2972,10 @@
Vitadose9mnt5yrs.addCommand(getLabtestsCmd());
Vitadose9mnt5yrs.setCommandListener(this);//GEN-END:|688-getter|1|688-postInit
// write post-init user code here
+ if ( Vitadose9mnt5yrs instanceof Form )
+ {
+ ((Form) Vitadose9mnt5yrs).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|688-getter|2|
return Vitadose9mnt5yrs;
}
@@ -3072,6 +3128,10 @@
Rtisticasestreated.addCommand(getFollowingimmunizationCmd());
Rtisticasestreated.setCommandListener(this);//GEN-END:|627-getter|1|627-postInit
// write post-init user code here
+ if ( Rtisticasestreated instanceof Form )
+ {
+ ((Form) Rtisticasestreated).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|627-getter|2|
return Rtisticasestreated;
}
@@ -4536,4 +4596,126 @@
}
return true;
}
+
+
+ /*
+ * Author: Thai Chuong Oct. 6th 2012
+ */
+ private boolean valueValidation(TextField myTextField, String[] mylist){
+ for (int i = 0; i < mylist.length; i++)
+ {
+ if (myTextField.getString().equalsIgnoreCase( mylist[i] ))
+ return false;
+ }
+ return true;
+
+ }
+
+ private void Validation (Item item, TextField myTextField){
+ if (item == myTextField)
+ {
+ String[] list = {"00"};
+ if(!valueValidation(myTextField, list) || (myTextField.getString().length() > 1 && Integer.parseInt(myTextField.getString()) == 0))
+ {
+ myTextField.setString( "" );
+ Alert myAlert = new Alert("Wrong data","not allow!",null,AlertType.INFO);
+ myAlert.setTimeout(1500);
+ Display.getDisplay(this).setCurrent(myAlert,getDisplay().getCurrent());
+ }
+ }
+ }
+
+ /*
+ * Author: Thai Chuong Oct. 6th 2012
+ */
+ public void itemStateChanged( Item item )
+ {
+ Validation(item, textField);
+ Validation(item, textField1);
+ Validation(item, textField2);
+ Validation(item, textField3);
+ Validation(item, textField4);
+ Validation(item, textField5);
+ Validation(item, textField6);
+ Validation(item, textField7);
+ Validation(item, textField8);
+ Validation(item, textField9);
+ Validation(item, textField10);
+ Validation(item, textField11);
+ Validation(item, textField12);
+ Validation(item, textField13);
+ Validation(item, textField14);
+ Validation(item, textField15);
+ Validation(item, textField16);
+ Validation(item, textField17);
+ Validation(item, textField18);
+ Validation(item, textField19);
+ Validation(item, textField20);
+ Validation(item, textField21);
+ Validation(item, textField22);
+ Validation(item, textField23);
+ Validation(item, textField24);
+ Validation(item, textField25);
+ Validation(item, textField26);
+ Validation(item, textField27);
+ Validation(item, textField28);
+ Validation(item, textField29);
+ Validation(item, textField30);
+ Validation(item, textField31);
+ Validation(item, textField32);
+ Validation(item, textField33);
+ Validation(item, textField34);
+ Validation(item, textField35);
+ Validation(item, textField36);
+ Validation(item, textField37);
+ Validation(item, textField38);
+ Validation(item, textField39);
+ Validation(item, textField40);
+ Validation(item, textField41);
+ Validation(item, textField42);
+ Validation(item, textField43);
+ Validation(item, textField44);
+ Validation(item, textField45);
+ Validation(item, textField46);
+ Validation(item, textField47);
+ Validation(item, textField48);
+ Validation(item, textField49);
+ Validation(item, textField50);
+ Validation(item, textField51);
+ Validation(item, textField52);
+ Validation(item, textField53);
+ Validation(item, textField54);
+ Validation(item, textField55);
+ Validation(item, textField56);
+ Validation(item, textField57);
+ Validation(item, textField58);
+ Validation(item, textField59);
+ Validation(item, textField60);
+ Validation(item, textField61);
+ Validation(item, textField61);
+ Validation(item, textField63);
+ Validation(item, textField64);
+ Validation(item, textField65);
+ Validation(item, textField66);
+ Validation(item, textField67);
+ Validation(item, textField68);
+ Validation(item, textField69);
+ Validation(item, textField70);
+ Validation(item, textField71);
+ Validation(item, textField72);
+ Validation(item, textField73);
+ Validation(item, textField74);
+ Validation(item, textField75);
+ Validation(item, textField76);
+ Validation(item, textField77);
+ Validation(item, textField78);
+ Validation(item, textField79);
+ Validation(item, textField80);
+ Validation(item, textField81);
+ Validation(item, textField82);
+ Validation(item, textField83);
+ Validation(item, textField84);
+ Validation(item, textField85);
+
+ }
}
\ No newline at end of file
=== modified file 'local/in/dhis-mobile/J2ME/HP/HMIS-PHC/SCForm1/src/org/hispindia/mobile/SCForm1.vmd'
--- local/in/dhis-mobile/J2ME/HP/HMIS-PHC/SCForm1/src/org/hispindia/mobile/SCForm1.vmd 2012-05-23 06:15:36 +0000
+++ local/in/dhis-mobile/J2ME/HP/HMIS-PHC/SCForm1/src/org/hispindia/mobile/SCForm1.vmd 2012-10-06 11:36:56 +0000
@@ -1722,18 +1722,18 @@
<Property name="label" typeID="Pjava.lang.String" value="VOk"/>
<Property name="type" typeID="Pint" value="V4"/>
</Component>
+ <Component componentID="662" typeID="Cjavax.microedition.lcdui.Command">
+ <Property name="instanceName" typeID="Pjava.lang.String" value="VvitaminadoseBackCmd"/>
+ <Property name="codeGenerated" typeID="Pboolean" value="Vtrue"/>
+ <Property name="label" typeID="Pjava.lang.String" value="VBack"/>
+ <Property name="type" typeID="Pint" value="V2"/>
+ </Component>
<Component componentID="176" typeID="C#SplashScreenDismissCommand">
<Property name="label" typeID="Pjava.lang.String" value="VDismiss"/>
<Property name="type" typeID="Pint" value="V4"/>
<Property name="priority" typeID="Pint" value="V0"/>
<Property name="ordinary" typeID="Pboolean" value="Vfalse"/>
</Component>
- <Component componentID="662" typeID="Cjavax.microedition.lcdui.Command">
- <Property name="instanceName" typeID="Pjava.lang.String" value="VvitaminadoseBackCmd"/>
- <Property name="codeGenerated" typeID="Pboolean" value="Vtrue"/>
- <Property name="label" typeID="Pjava.lang.String" value="VBack"/>
- <Property name="type" typeID="Pint" value="V2"/>
- </Component>
<Component componentID="206" typeID="Cjavax.microedition.lcdui.Command">
<Property name="instanceName" typeID="Pjava.lang.String" value="VsendExitCmd"/>
<Property name="codeGenerated" typeID="Pboolean" value="Vtrue"/>
@@ -1752,18 +1752,18 @@
<Property name="label" typeID="Pjava.lang.String" value="VBack"/>
<Property name="type" typeID="Pint" value="V2"/>
</Component>
+ <Component componentID="709" typeID="Cjavax.microedition.lcdui.Command">
+ <Property name="instanceName" typeID="Pjava.lang.String" value="VmenstrualhygieneprogrammeCmd"/>
+ <Property name="codeGenerated" typeID="Pboolean" value="Vtrue"/>
+ <Property name="label" typeID="Pjava.lang.String" value="VNext"/>
+ <Property name="type" typeID="Pint" value="V4"/>
+ </Component>
<Component componentID="227" typeID="Cjavax.microedition.lcdui.Command">
<Property name="instanceName" typeID="Pjava.lang.String" value="VloadExitCmd"/>
<Property name="codeGenerated" typeID="Pboolean" value="Vtrue"/>
<Property name="label" typeID="Pjava.lang.String" value="VExit"/>
<Property name="type" typeID="Pint" value="V7"/>
</Component>
- <Component componentID="709" typeID="Cjavax.microedition.lcdui.Command">
- <Property name="instanceName" typeID="Pjava.lang.String" value="VmenstrualhygieneprogrammeCmd"/>
- <Property name="codeGenerated" typeID="Pboolean" value="Vtrue"/>
- <Property name="label" typeID="Pjava.lang.String" value="VNext"/>
- <Property name="type" typeID="Pint" value="V4"/>
- </Component>
<Component componentID="225" typeID="Cjavax.microedition.lcdui.Command">
<Property name="instanceName" typeID="Pjava.lang.String" value="VloadCmd"/>
<Property name="codeGenerated" typeID="Pboolean" value="Vtrue"/>
@@ -1867,27 +1867,27 @@
</Component>
</Document>
<FlowScene version="1">
- <Node componentID="473" descriptorID="componentNode473" x="504" y="508"/>
+ <Node componentID="681" descriptorID="componentNode681" x="41" y="1630"/>
+ <Node componentID="219" descriptorID="componentNode219" x="710" y="546"/>
+ <Node componentID="652" descriptorID="componentNode652" x="206" y="1240"/>
+ <Node componentID="642" descriptorID="componentNode642" x="40" y="1121"/>
+ <Node componentID="202" descriptorID="componentNode202" x="1188" y="521"/>
<Node componentID="533" descriptorID="componentNode533" x="-66" y="219"/>
- <Node componentID="661" descriptorID="componentNode661" x="40" y="1344"/>
- <Node componentID="578" descriptorID="componentNode578" x="7" y="619"/>
+ <Node componentID="671" descriptorID="componentNode671" x="245" y="1482"/>
+ <Node componentID="167" descriptorID="componentNode167" x="766" y="181"/>
<Node componentID="557" descriptorID="componentNode557" x="30" y="372"/>
- <Node componentID="518" descriptorID="componentNode518" x="80" y="94"/>
<Node componentID="587" descriptorID="componentNode587" x="193" y="757"/>
<Node componentID="233" descriptorID="componentNode233" x="497" y="373"/>
+ <Node componentID="661" descriptorID="componentNode661" x="40" y="1344"/>
+ <Node componentID="518" descriptorID="componentNode518" x="80" y="94"/>
+ <Node componentID="568" descriptorID="componentNode568" x="165" y="513"/>
+ <Node componentID="606" descriptorID="componentNode606" x="45" y="869"/>
+ <Node componentID="578" descriptorID="componentNode578" x="7" y="619"/>
+ <Node componentID="724" descriptorID="componentNode724" x="1190" y="650"/>
+ <Node componentID="688" descriptorID="componentNode688" x="288" y="1735"/>
+ <Node componentID="473" descriptorID="componentNode473" x="504" y="508"/>
<Node componentID="178" descriptorID="componentNode178" x="1188" y="181"/>
- <Node componentID="652" descriptorID="componentNode652" x="206" y="1240"/>
- <Node componentID="202" descriptorID="componentNode202" x="1188" y="521"/>
- <Node componentID="167" descriptorID="componentNode167" x="766" y="181"/>
- <Node componentID="688" descriptorID="componentNode688" x="288" y="1735"/>
- <Node componentID="606" descriptorID="componentNode606" x="45" y="869"/>
- <Node componentID="219" descriptorID="componentNode219" x="710" y="546"/>
- <Node componentID="671" descriptorID="componentNode671" x="245" y="1482"/>
+ <Node componentID="627" descriptorID="componentNode627" x="215" y="999"/>
<Node componentID="2" descriptorID="componentNode2" x="954" y="375"/>
- <Node componentID="627" descriptorID="componentNode627" x="215" y="999"/>
- <Node componentID="681" descriptorID="componentNode681" x="41" y="1630"/>
- <Node componentID="724" descriptorID="componentNode724" x="1190" y="650"/>
- <Node componentID="568" descriptorID="componentNode568" x="165" y="513"/>
- <Node componentID="642" descriptorID="componentNode642" x="40" y="1121"/>
</FlowScene>
</VisualDesign>
=== modified file 'local/in/dhis-mobile/J2ME/HP/HMIS-SUBCENTER/SCForm1/nbproject/private/private.properties'
--- local/in/dhis-mobile/J2ME/HP/HMIS-SUBCENTER/SCForm1/nbproject/private/private.properties 2012-05-23 06:15:36 +0000
+++ local/in/dhis-mobile/J2ME/HP/HMIS-SUBCENTER/SCForm1/nbproject/private/private.properties 2012-10-06 11:36:56 +0000
@@ -1,8 +1,8 @@
-#Wed, 02 May 2012 10:31:29 +0530
+#Sat, 06 Oct 2012 17:22:19 +0700
#Sat Jun 26 20:02:35 IST 2010
-netbeans.user=C\:\\Users\\ARUNIMA\\.netbeans\\7.1
+netbeans.user=C\:\\Users\\Thai Chuong\\.netbeans\\7.1
javadoc.preview=true
config.active=
-deployment.counter=330
+deployment.counter=332
app-version.autoincrement=true
-deployment.number=0.3.29
+deployment.number=0.3.31
=== modified file 'local/in/dhis-mobile/J2ME/HP/HMIS-SUBCENTER/SCForm1/nbproject/private/private.xml'
--- local/in/dhis-mobile/J2ME/HP/HMIS-SUBCENTER/SCForm1/nbproject/private/private.xml 2012-05-23 06:15:36 +0000
+++ local/in/dhis-mobile/J2ME/HP/HMIS-SUBCENTER/SCForm1/nbproject/private/private.xml 2012-10-06 11:36:56 +0000
@@ -6,4 +6,7 @@
<line>378</line>
</file>
</editor-bookmarks>
+ <open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/1">
+ <file>file:/D:/DHIS%20trunk/local/in/dhis-mobile/J2ME/HP/HMIS-SUBCENTER/SCForm1/src/org/hispindia/mobile/SCForm1.java</file>
+ </open-files>
</project-private>
=== modified file 'local/in/dhis-mobile/J2ME/HP/HMIS-SUBCENTER/SCForm1/src/org/hispindia/mobile/SCForm1.java'
--- local/in/dhis-mobile/J2ME/HP/HMIS-SUBCENTER/SCForm1/src/org/hispindia/mobile/SCForm1.java 2012-05-23 06:15:36 +0000
+++ local/in/dhis-mobile/J2ME/HP/HMIS-SUBCENTER/SCForm1/src/org/hispindia/mobile/SCForm1.java 2012-10-06 11:36:56 +0000
@@ -16,7 +16,7 @@
import javax.wireless.messaging.TextMessage;
import org.netbeans.microedition.lcdui.SplashScreen;
-public class SCForm1 extends MIDlet implements CommandListener {
+public class SCForm1 extends MIDlet implements CommandListener, ItemStateListener {
private boolean midletPaused = false;
private boolean editingLastReport = false;
@@ -1521,6 +1521,10 @@
Antinatalcare.addCommand(getAntinatalcareBackCmd());
Antinatalcare.setCommandListener(this);//GEN-END:|473-getter|1|473-postInit
// write post-init user code here
+ if ( Antinatalcare instanceof Form )
+ {
+ ((Form) Antinatalcare).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|473-getter|2|
return Antinatalcare;
}
@@ -1540,6 +1544,10 @@
ANC_Services.addCommand(getANC_ServicesCmd());
ANC_Services.setCommandListener(this);//GEN-END:|518-getter|1|518-postInit
// write post-init user code here
+ if ( ANC_Services instanceof Form )
+ {
+ ((Form) ANC_Services).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|518-getter|2|
return ANC_Services;
}
@@ -1744,6 +1752,10 @@
Deliveries.addCommand(getDeliveriesCmd());
Deliveries.setCommandListener(this);//GEN-END:|533-getter|1|533-postInit
// write post-init user code here
+ if ( Deliveries instanceof Form )
+ {
+ ((Form) Deliveries).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|533-getter|2|
return Deliveries;
}
@@ -1881,6 +1893,10 @@
InstitutionalDeliveries.addCommand(getInstitutionaldeliveriesCmd());
InstitutionalDeliveries.setCommandListener(this);//GEN-END:|546-getter|1|546-postInit
// write post-init user code here
+ if ( InstitutionalDeliveries instanceof Form )
+ {
+ ((Form) InstitutionalDeliveries).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|546-getter|2|
return InstitutionalDeliveries;
}
@@ -1971,6 +1987,10 @@
Pregnancyoutcome.addCommand(getPregnancyoutcomeCmd());
Pregnancyoutcome.setCommandListener(this);//GEN-END:|557-getter|1|557-postInit
// write post-init user code here
+ if ( Pregnancyoutcome instanceof Form )
+ {
+ ((Form) Pregnancyoutcome).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|557-getter|2|
return Pregnancyoutcome;
}
@@ -2123,6 +2143,10 @@
Newbornsweighted.addCommand(getNewbornsweightedCmd());
Newbornsweighted.setCommandListener(this);//GEN-END:|568-getter|1|568-postInit
// write post-init user code here
+ if ( Newbornsweighted instanceof Form )
+ {
+ ((Form) Newbornsweighted).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|568-getter|2|
return Newbornsweighted;
}
@@ -2225,6 +2249,10 @@
PostNatalCare.addCommand(getPostnatalcareCmd());
PostNatalCare.setCommandListener(this);//GEN-END:|578-getter|1|578-postInit
// write post-init user code here
+ if ( PostNatalCare instanceof Form )
+ {
+ ((Form) PostNatalCare).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|578-getter|2|
return PostNatalCare;
}
@@ -2310,6 +2338,10 @@
FamilyPlanning.addCommand(getFamilyplanningCmd());
FamilyPlanning.setCommandListener(this);//GEN-END:|587-getter|1|587-postInit
// write post-init user code here
+ if ( FamilyPlanning instanceof Form )
+ {
+ ((Form) FamilyPlanning).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|587-getter|2|
return FamilyPlanning;
}
@@ -2565,6 +2597,10 @@
ChildImmunization.addCommand(getChildimmunizationCmd());
ChildImmunization.setCommandListener(this);//GEN-END:|606-getter|1|606-postInit
// write post-init user code here
+ if ( ChildImmunization instanceof Form )
+ {
+ ((Form) ChildImmunization).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|606-getter|2|
return ChildImmunization;
}
@@ -3008,6 +3044,10 @@
AEFI.addCommand(getAefiCmd());
AEFI.setCommandListener(this);//GEN-END:|642-getter|1|642-postInit
// write post-init user code here
+ if ( AEFI instanceof Form )
+ {
+ ((Form) AEFI).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|642-getter|2|
return AEFI;
}
@@ -3111,6 +3151,10 @@
Immunizationsessions.addCommand(getImmunizationsessionsCmd());
Immunizationsessions.setCommandListener(this);//GEN-END:|652-getter|1|652-postInit
// write post-init user code here
+ if ( Immunizationsessions instanceof Form )
+ {
+ ((Form) Immunizationsessions).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|652-getter|2|
return Immunizationsessions;
}
@@ -3164,6 +3208,10 @@
VitaminADose.addCommand(getVitaminadoseCmd());
VitaminADose.setCommandListener(this);//GEN-END:|661-getter|1|661-postInit
// write post-init user code here
+ if ( VitaminADose instanceof Form )
+ {
+ ((Form) VitaminADose).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|661-getter|2|
return VitaminADose;
}
@@ -3330,6 +3378,10 @@
ChildhoodDiseasesreported.addCommand(getChildhoodCmd());
ChildhoodDiseasesreported.setCommandListener(this);//GEN-END:|671-getter|1|671-postInit
// write post-init user code here
+ if ( ChildhoodDiseasesreported instanceof Form )
+ {
+ ((Form) ChildhoodDiseasesreported).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|671-getter|2|
return ChildhoodDiseasesreported;
}
@@ -3432,6 +3484,10 @@
HealthFacilityServices.addCommand(getHealthfacilityservicesCmd());
HealthFacilityServices.setCommandListener(this);//GEN-END:|681-getter|1|681-postInit
// write post-init user code here
+ if ( HealthFacilityServices instanceof Form )
+ {
+ ((Form) HealthFacilityServices).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|681-getter|2|
return HealthFacilityServices;
}
@@ -3451,6 +3507,10 @@
LabTests.addCommand(getLabtestsCmd());
LabTests.setCommandListener(this);//GEN-END:|688-getter|1|688-postInit
// write post-init user code here
+ if ( LabTests instanceof Form )
+ {
+ ((Form) LabTests).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|688-getter|2|
return LabTests;
}
@@ -3603,6 +3663,10 @@
FollowingImmunization.addCommand(getFollowingimmunizationCmd());
FollowingImmunization.setCommandListener(this);//GEN-END:|627-getter|1|627-postInit
// write post-init user code here
+ if ( FollowingImmunization instanceof Form )
+ {
+ ((Form) FollowingImmunization).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|627-getter|2|
return FollowingImmunization;
}
@@ -3654,6 +3718,10 @@
MenstrualHygieneProgramme.addCommand(getMenstrualhygieneprogrammeCmd());
MenstrualHygieneProgramme.setCommandListener(this);//GEN-END:|706-getter|1|706-postInit
// write post-init user code here
+ if ( MenstrualHygieneProgramme instanceof Form )
+ {
+ ((Form) MenstrualHygieneProgramme).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|706-getter|2|
return MenstrualHygieneProgramme;
}
@@ -4522,4 +4590,124 @@
}
return true;
}
+
+ /*
+ * Author: Thai Chuong Oct. 6th 2012
+ */
+ private boolean valueValidation(TextField myTextField, String[] mylist){
+ for (int i = 0; i < mylist.length; i++)
+ {
+ if (myTextField.getString().equalsIgnoreCase( mylist[i] ))
+ return false;
+ }
+ return true;
+
+ }
+
+ private void Validation (Item item, TextField myTextField){
+ if (item == myTextField)
+ {
+ String[] list = {"00"};
+ if(!valueValidation(myTextField, list) || (myTextField.getString().length() > 1 && Integer.parseInt(myTextField.getString()) == 0))
+ {
+ myTextField.setString( "" );
+ Alert myAlert = new Alert("Wrong data","not allow!",null,AlertType.INFO);
+ myAlert.setTimeout(1500);
+ Display.getDisplay(this).setCurrent(myAlert,getDisplay().getCurrent());
+ }
+ }
+ }
+
+ /*
+ * Author: Thai Chuong Oct. 6th 2012
+ */
+ public void itemStateChanged( Item item )
+ {
+ Validation(item, textField);
+ Validation(item, textField1);
+ Validation(item, textField2);
+ Validation(item, textField3);
+ Validation(item, textField4);
+ Validation(item, textField5);
+ Validation(item, textField6);
+ Validation(item, textField7);
+ Validation(item, textField8);
+ Validation(item, textField9);
+ Validation(item, textField10);
+ Validation(item, textField11);
+ Validation(item, textField12);
+ Validation(item, textField13);
+ Validation(item, textField14);
+ Validation(item, textField15);
+ Validation(item, textField16);
+ Validation(item, textField17);
+ Validation(item, textField18);
+ Validation(item, textField19);
+ Validation(item, textField20);
+ Validation(item, textField21);
+ Validation(item, textField22);
+ Validation(item, textField23);
+ Validation(item, textField24);
+ Validation(item, textField25);
+ Validation(item, textField26);
+ Validation(item, textField27);
+ Validation(item, textField28);
+ Validation(item, textField29);
+ Validation(item, textField30);
+ Validation(item, textField31);
+ Validation(item, textField32);
+ Validation(item, textField33);
+ Validation(item, textField34);
+ Validation(item, textField35);
+ Validation(item, textField36);
+ Validation(item, textField37);
+ Validation(item, textField38);
+ Validation(item, textField39);
+ Validation(item, textField40);
+ Validation(item, textField41);
+ Validation(item, textField42);
+ Validation(item, textField43);
+ Validation(item, textField44);
+ Validation(item, textField45);
+ Validation(item, textField46);
+ Validation(item, textField47);
+ Validation(item, textField48);
+ Validation(item, textField49);
+ Validation(item, textField50);
+ Validation(item, textField51);
+ Validation(item, textField52);
+ Validation(item, textField53);
+ Validation(item, textField54);
+ Validation(item, textField55);
+ Validation(item, textField56);
+ Validation(item, textField57);
+ Validation(item, textField58);
+ Validation(item, textField59);
+ Validation(item, textField60);
+ Validation(item, textField61);
+ Validation(item, textField61);
+ Validation(item, textField63);
+ Validation(item, textField64);
+ Validation(item, textField65);
+ Validation(item, textField66);
+ Validation(item, textField67);
+ Validation(item, textField68);
+ Validation(item, textField69);
+ Validation(item, textField70);
+ Validation(item, textField71);
+ Validation(item, textField72);
+ Validation(item, textField73);
+ Validation(item, textField74);
+ Validation(item, textField75);
+ Validation(item, textField76);
+ Validation(item, textField77);
+ Validation(item, textField78);
+ Validation(item, Newborns_Weighed_female);
+ Validation(item, Newborns_25kg_female);
+ Validation(item, Newborns_Breastfed_female);
+ Validation(item, textFieldHepB0);
+ Validation(item, textMeasles2nddose);
+ Validation(item, textAWWpresent);
+
+ }
}
\ No newline at end of file
=== modified file 'local/in/dhis-mobile/J2ME/HP/HMIS-SUBCENTER/SCForm1/src/org/hispindia/mobile/SCForm1.vmd'
--- local/in/dhis-mobile/J2ME/HP/HMIS-SUBCENTER/SCForm1/src/org/hispindia/mobile/SCForm1.vmd 2012-05-23 06:15:36 +0000
+++ local/in/dhis-mobile/J2ME/HP/HMIS-SUBCENTER/SCForm1/src/org/hispindia/mobile/SCForm1.vmd 2012-10-06 11:36:56 +0000
@@ -1776,18 +1776,18 @@
<Property name="label" typeID="Pjava.lang.String" value="VOk"/>
<Property name="type" typeID="Pint" value="V4"/>
</Component>
+ <Component componentID="176" typeID="C#SplashScreenDismissCommand">
+ <Property name="label" typeID="Pjava.lang.String" value="VDismiss"/>
+ <Property name="type" typeID="Pint" value="V4"/>
+ <Property name="priority" typeID="Pint" value="V0"/>
+ <Property name="ordinary" typeID="Pboolean" value="Vfalse"/>
+ </Component>
<Component componentID="662" typeID="Cjavax.microedition.lcdui.Command">
<Property name="instanceName" typeID="Pjava.lang.String" value="VvitaminadoseBackCmd"/>
<Property name="codeGenerated" typeID="Pboolean" value="Vtrue"/>
<Property name="label" typeID="Pjava.lang.String" value="VBack"/>
<Property name="type" typeID="Pint" value="V2"/>
</Component>
- <Component componentID="176" typeID="C#SplashScreenDismissCommand">
- <Property name="label" typeID="Pjava.lang.String" value="VDismiss"/>
- <Property name="type" typeID="Pint" value="V4"/>
- <Property name="priority" typeID="Pint" value="V0"/>
- <Property name="ordinary" typeID="Pboolean" value="Vfalse"/>
- </Component>
<Component componentID="206" typeID="Cjavax.microedition.lcdui.Command">
<Property name="instanceName" typeID="Pjava.lang.String" value="VsendExitCmd"/>
<Property name="codeGenerated" typeID="Pboolean" value="Vtrue"/>
@@ -1806,18 +1806,18 @@
<Property name="label" typeID="Pjava.lang.String" value="VBack"/>
<Property name="type" typeID="Pint" value="V2"/>
</Component>
+ <Component componentID="227" typeID="Cjavax.microedition.lcdui.Command">
+ <Property name="instanceName" typeID="Pjava.lang.String" value="VloadExitCmd"/>
+ <Property name="codeGenerated" typeID="Pboolean" value="Vtrue"/>
+ <Property name="label" typeID="Pjava.lang.String" value="VExit"/>
+ <Property name="type" typeID="Pint" value="V7"/>
+ </Component>
<Component componentID="709" typeID="Cjavax.microedition.lcdui.Command">
<Property name="instanceName" typeID="Pjava.lang.String" value="VmenstrualhygieneprogrammeCmd"/>
<Property name="codeGenerated" typeID="Pboolean" value="Vtrue"/>
<Property name="label" typeID="Pjava.lang.String" value="VNext"/>
<Property name="type" typeID="Pint" value="V4"/>
</Component>
- <Component componentID="227" typeID="Cjavax.microedition.lcdui.Command">
- <Property name="instanceName" typeID="Pjava.lang.String" value="VloadExitCmd"/>
- <Property name="codeGenerated" typeID="Pboolean" value="Vtrue"/>
- <Property name="label" typeID="Pjava.lang.String" value="VExit"/>
- <Property name="type" typeID="Pint" value="V7"/>
- </Component>
<Component componentID="225" typeID="Cjavax.microedition.lcdui.Command">
<Property name="instanceName" typeID="Pjava.lang.String" value="VloadCmd"/>
<Property name="codeGenerated" typeID="Pboolean" value="Vtrue"/>
@@ -1921,29 +1921,29 @@
</Component>
</Document>
<FlowScene version="1">
- <Node componentID="533" descriptorID="componentNode533" x="24" y="128"/>
+ <Node componentID="202" descriptorID="componentNode202" x="1188" y="521"/>
+ <Node componentID="587" descriptorID="componentNode587" x="193" y="757"/>
+ <Node componentID="578" descriptorID="componentNode578" x="45" y="619"/>
+ <Node componentID="557" descriptorID="componentNode557" x="30" y="372"/>
+ <Node componentID="2" descriptorID="componentNode2" x="954" y="375"/>
+ <Node componentID="652" descriptorID="componentNode652" x="206" y="1240"/>
+ <Node componentID="671" descriptorID="componentNode671" x="245" y="1482"/>
+ <Node componentID="681" descriptorID="componentNode681" x="41" y="1630"/>
+ <Node componentID="688" descriptorID="componentNode688" x="288" y="1735"/>
+ <Node componentID="518" descriptorID="componentNode518" x="158" y="11"/>
+ <Node componentID="473" descriptorID="componentNode473" x="504" y="508"/>
+ <Node componentID="167" descriptorID="componentNode167" x="766" y="181"/>
+ <Node componentID="627" descriptorID="componentNode627" x="215" y="999"/>
<Node componentID="724" descriptorID="componentNode724" x="1190" y="650"/>
<Node componentID="219" descriptorID="componentNode219" x="710" y="546"/>
+ <Node componentID="606" descriptorID="componentNode606" x="45" y="869"/>
<Node componentID="661" descriptorID="componentNode661" x="40" y="1344"/>
- <Node componentID="587" descriptorID="componentNode587" x="193" y="757"/>
- <Node componentID="652" descriptorID="componentNode652" x="206" y="1240"/>
- <Node componentID="167" descriptorID="componentNode167" x="766" y="181"/>
- <Node componentID="518" descriptorID="componentNode518" x="158" y="11"/>
- <Node componentID="578" descriptorID="componentNode578" x="45" y="619"/>
- <Node componentID="546" descriptorID="componentNode546" x="137" y="251"/>
+ <Node componentID="178" descriptorID="componentNode178" x="1188" y="181"/>
<Node componentID="233" descriptorID="componentNode233" x="497" y="373"/>
+ <Node componentID="706" descriptorID="componentNode706" x="39" y="1844"/>
<Node componentID="568" descriptorID="componentNode568" x="165" y="513"/>
- <Node componentID="688" descriptorID="componentNode688" x="288" y="1735"/>
- <Node componentID="178" descriptorID="componentNode178" x="1188" y="181"/>
- <Node componentID="627" descriptorID="componentNode627" x="215" y="999"/>
- <Node componentID="706" descriptorID="componentNode706" x="39" y="1844"/>
- <Node componentID="681" descriptorID="componentNode681" x="41" y="1630"/>
<Node componentID="642" descriptorID="componentNode642" x="40" y="1121"/>
- <Node componentID="2" descriptorID="componentNode2" x="954" y="375"/>
- <Node componentID="202" descriptorID="componentNode202" x="1188" y="521"/>
- <Node componentID="606" descriptorID="componentNode606" x="45" y="869"/>
- <Node componentID="473" descriptorID="componentNode473" x="504" y="508"/>
- <Node componentID="671" descriptorID="componentNode671" x="245" y="1482"/>
- <Node componentID="557" descriptorID="componentNode557" x="30" y="372"/>
+ <Node componentID="546" descriptorID="componentNode546" x="137" y="251"/>
+ <Node componentID="533" descriptorID="componentNode533" x="24" y="128"/>
</FlowScene>
</VisualDesign>
=== modified file 'local/in/dhis-mobile/J2ME/HP/IDSP jar S_1/SCForm1/nbproject/private/private.properties'
--- local/in/dhis-mobile/J2ME/HP/IDSP jar S_1/SCForm1/nbproject/private/private.properties 2012-05-23 06:15:36 +0000
+++ local/in/dhis-mobile/J2ME/HP/IDSP jar S_1/SCForm1/nbproject/private/private.properties 2012-10-06 11:36:56 +0000
@@ -1,8 +1,8 @@
-#Wed, 02 May 2012 10:31:50 +0530
+#Sat, 06 Oct 2012 16:56:08 +0700
#Sat Jun 26 20:02:35 IST 2010
-netbeans.user=C\:\\Users\\ARUNIMA\\.netbeans\\7.1
+netbeans.user=C\:\\Users\\Thai Chuong\\.netbeans\\7.1
javadoc.preview=true
config.active=
-deployment.counter=352
+deployment.counter=366
app-version.autoincrement=true
-deployment.number=0.3.51
+deployment.number=0.3.65
=== modified file 'local/in/dhis-mobile/J2ME/HP/IDSP jar S_1/SCForm1/nbproject/private/private.xml'
--- local/in/dhis-mobile/J2ME/HP/IDSP jar S_1/SCForm1/nbproject/private/private.xml 2012-05-23 06:15:36 +0000
+++ local/in/dhis-mobile/J2ME/HP/IDSP jar S_1/SCForm1/nbproject/private/private.xml 2012-10-06 11:36:56 +0000
@@ -6,4 +6,7 @@
<line>298</line>
</file>
</editor-bookmarks>
+ <open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/1">
+ <file>file:/D:/DHIS%20trunk/local/in/dhis-mobile/J2ME/HP/IDSP%20jar%20S_1/SCForm1/src/org/hispindia/mobile/SCForm1.java</file>
+ </open-files>
</project-private>
=== modified file 'local/in/dhis-mobile/J2ME/HP/IDSP jar S_1/SCForm1/src/org/hispindia/mobile/SCForm1.java'
--- local/in/dhis-mobile/J2ME/HP/IDSP jar S_1/SCForm1/src/org/hispindia/mobile/SCForm1.java 2012-05-23 06:15:36 +0000
+++ local/in/dhis-mobile/J2ME/HP/IDSP jar S_1/SCForm1/src/org/hispindia/mobile/SCForm1.java 2012-10-06 11:36:56 +0000
@@ -16,7 +16,7 @@
import javax.wireless.messaging.TextMessage;
import org.netbeans.microedition.lcdui.SplashScreen;
-public class SCForm1 extends MIDlet implements CommandListener {
+public class SCForm1 extends MIDlet implements CommandListener, ItemStateListener {
private boolean midletPaused = false;
private boolean editingLastReport = false;
@@ -1737,6 +1737,10 @@
Fever.addCommand(getFeverOk());
Fever.setCommandListener(this);//GEN-END:|654-getter|1|654-postInit
// write post-init user code here
+ if ( Fever instanceof Form )
+ {
+ ((Form) Fever).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|654-getter|2|
return Fever;
}
@@ -2131,6 +2135,10 @@
MalecasesGT5yrs.addCommand(getMalecases5yrsOkCmd());
MalecasesGT5yrs.setCommandListener(this);//GEN-END:|711-getter|1|711-postInit
// write post-init user code here
+ if ( MalecasesGT5yrs instanceof Form )
+ {
+ ((Form) MalecasesGT5yrs).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|711-getter|2|
return MalecasesGT5yrs;
}
@@ -2250,6 +2258,10 @@
FemalecasesGT5yrs.addCommand(getFemalecases5yrsOkCmd());
FemalecasesGT5yrs.setCommandListener(this);//GEN-END:|722-getter|1|722-postInit
// write post-init user code here
+ if ( FemalecasesGT5yrs instanceof Form )
+ {
+ ((Form) FemalecasesGT5yrs).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|722-getter|2|
return FemalecasesGT5yrs;
}
@@ -2337,6 +2349,10 @@
Maledeaths5yrs.addCommand(getMaledeaths5yrsOkCmd());
Maledeaths5yrs.setCommandListener(this);//GEN-END:|732-getter|1|732-postInit
// write post-init user code here
+ if ( Maledeaths5yrs instanceof Form )
+ {
+ ((Form) Maledeaths5yrs).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|732-getter|2|
return Maledeaths5yrs;
}
@@ -2424,6 +2440,10 @@
MaleDeathsGT5yrs.addCommand(getMaledeaths5yrsOkCmd1());
MaleDeathsGT5yrs.setCommandListener(this);//GEN-END:|741-getter|1|741-postInit
// write post-init user code here
+ if ( MaleDeathsGT5yrs instanceof Form )
+ {
+ ((Form) MaleDeathsGT5yrs).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|741-getter|2|
return MaleDeathsGT5yrs;
}
@@ -2511,6 +2531,10 @@
FemaledeathsLT5yrs.addCommand(getFemaledeathsLT5yrsOkCmd());
FemaledeathsLT5yrs.setCommandListener(this);//GEN-END:|755-getter|1|755-postInit
// write post-init user code here
+ if ( FemaledeathsLT5yrs instanceof Form )
+ {
+ ((Form) FemaledeathsLT5yrs).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|755-getter|2|
return FemaledeathsLT5yrs;
}
@@ -2598,6 +2622,10 @@
Fevermorethan7days.addCommand(getFevermorethan7daysOkCmd());
Fevermorethan7days.setCommandListener(this);//GEN-END:|764-getter|1|764-postInit
// write post-init user code here
+ if ( Fevermorethan7days instanceof Form )
+ {
+ ((Form) Fevermorethan7days).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|764-getter|2|
return Fevermorethan7days;
}
@@ -2753,6 +2781,10 @@
Coughwithorwithoutfever.addCommand(getCoughwithorwithoutfeverOkCmd());
Coughwithorwithoutfever.setCommandListener(this);//GEN-END:|777-getter|1|777-postInit
// write post-init user code here
+ if ( Coughwithorwithoutfever instanceof Form )
+ {
+ ((Form) Coughwithorwithoutfever).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|777-getter|2|
return Coughwithorwithoutfever;
}
@@ -2767,7 +2799,7 @@
public StringItem getStringItem4() {
if (stringItem4 == null) {//GEN-END:|782-getter|0|782-preInit
// write pre-init user code here
- stringItem4 = new StringItem("Less than 3 weeks", null);//GEN-LINE:|782-getter|1|782-postInit
+ stringItem4 = new StringItem("Less than 2 weeks", null);//GEN-LINE:|782-getter|1|782-postInit
// write post-init user code here
}//GEN-BEGIN:|782-getter|2|
return stringItem4;
@@ -3118,6 +3150,10 @@
Morethan3weeks.addCommand(getMorethan3weeksOkCmd());
Morethan3weeks.setCommandListener(this);//GEN-END:|793-getter|1|793-postInit
// write post-init user code here
+ if ( Morethan3weeks instanceof Form )
+ {
+ ((Form) Morethan3weeks).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|793-getter|2|
return Morethan3weeks;
}
@@ -3388,6 +3424,10 @@
FemalecasesLT5yrs.addCommand(getFemalecasesLT5yrsOkCmd());
FemalecasesLT5yrs.setCommandListener(this);//GEN-END:|838-getter|1|838-postInit
// write post-init user code here
+ if ( FemalecasesLT5yrs instanceof Form )
+ {
+ ((Form) FemalecasesLT5yrs).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|838-getter|2|
return FemalecasesLT5yrs;
}
@@ -3475,6 +3515,10 @@
FemaledeathsGT5yrs.addCommand(getFemaledeathsGT5yrsOkCmd());
FemaledeathsGT5yrs.setCommandListener(this);//GEN-END:|847-getter|1|847-postInit
// write post-init user code here
+ if ( FemaledeathsGT5yrs instanceof Form )
+ {
+ ((Form) FemaledeathsGT5yrs).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|847-getter|2|
return FemaledeathsGT5yrs;
}
@@ -3627,6 +3671,10 @@
Loosewaterystoolsoflessthan2weeksduration.addCommand(getLoosewaterystoolsokCmd());
Loosewaterystoolsoflessthan2weeksduration.setCommandListener(this);//GEN-END:|867-getter|1|867-postInit
// write post-init user code here
+ if ( Loosewaterystoolsoflessthan2weeksduration instanceof Form )
+ {
+ ((Form) Loosewaterystoolsoflessthan2weeksduration).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|867-getter|2|
return Loosewaterystoolsoflessthan2weeksduration;
}
@@ -3646,6 +3694,10 @@
Femalecaseslessthan5yrs.addCommand(getFemalecasesLT5yrsokcmd());
Femalecaseslessthan5yrs.setCommandListener(this);//GEN-END:|872-getter|1|872-postInit
// write post-init user code here
+ if ( Femalecaseslessthan5yrs instanceof Form )
+ {
+ ((Form) Femalecaseslessthan5yrs).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|872-getter|2|
return Femalecaseslessthan5yrs;
}
@@ -3665,6 +3717,10 @@
Malecasesmorethan5yrs.addCommand(getMalecasesmorethan5yrsokcmd());
Malecasesmorethan5yrs.setCommandListener(this);//GEN-END:|877-getter|1|877-postInit
// write post-init user code here
+ if ( Malecasesmorethan5yrs instanceof Form )
+ {
+ ((Form) Malecasesmorethan5yrs).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|877-getter|2|
return Malecasesmorethan5yrs;
}
@@ -3684,6 +3740,10 @@
Femalecasesmorethan5yrs.addCommand(getFemalecasesmorethan5yrsokcmd());
Femalecasesmorethan5yrs.setCommandListener(this);//GEN-END:|882-getter|1|882-postInit
// write post-init user code here
+ if ( Femalecasesmorethan5yrs instanceof Form )
+ {
+ ((Form) Femalecasesmorethan5yrs).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|882-getter|2|
return Femalecasesmorethan5yrs;
}
@@ -3703,6 +3763,10 @@
Maledeathslessthan5yrs.addCommand(getMaledeathslessthan5yrsokcmd());
Maledeathslessthan5yrs.setCommandListener(this);//GEN-END:|887-getter|1|887-postInit
// write post-init user code here
+ if ( Maledeathslessthan5yrs instanceof Form )
+ {
+ ((Form) Maledeathslessthan5yrs).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|887-getter|2|
return Maledeathslessthan5yrs;
}
@@ -3722,6 +3786,10 @@
Femaledeathslessthan5yrs.addCommand(getFemaledeathslessthan5yrsokcmd());
Femaledeathslessthan5yrs.setCommandListener(this);//GEN-END:|892-getter|1|892-postInit
// write post-init user code here
+ if ( Femaledeathslessthan5yrs instanceof Form )
+ {
+ ((Form) Femaledeathslessthan5yrs).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|892-getter|2|
return Femaledeathslessthan5yrs;
}
@@ -3741,6 +3809,10 @@
Maledeathsmorethan5yrs.addCommand(getMaledeathsmorethan5yrsokcmd());
Maledeathsmorethan5yrs.setCommandListener(this);//GEN-END:|897-getter|1|897-postInit
// write post-init user code here
+ if ( Maledeathsmorethan5yrs instanceof Form )
+ {
+ ((Form) Maledeathsmorethan5yrs).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|897-getter|2|
return Maledeathsmorethan5yrs;
}
@@ -3760,6 +3832,10 @@
Femaledeathsmorethan5yrs.addCommand(getFemaledeathsmorethan5yrsokcmd());
Femaledeathsmorethan5yrs.setCommandListener(this);//GEN-END:|902-getter|1|902-postInit
// write post-init user code here
+ if ( Femaledeathsmorethan5yrs instanceof Form )
+ {
+ ((Form) Femaledeathsmorethan5yrs).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|902-getter|2|
return Femaledeathsmorethan5yrs;
}
@@ -3780,6 +3856,10 @@
Jaundicecasesoflessthan4weeksduration.addCommand(getJaundicecasesoflessthan4weeksdurationokcmd());
Jaundicecasesoflessthan4weeksduration.setCommandListener(this);//GEN-END:|909-getter|1|909-postInit
// write post-init user code here
+ if ( Jaundicecasesoflessthan4weeksduration instanceof Form )
+ {
+ ((Form) Jaundicecasesoflessthan4weeksduration).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|909-getter|2|
return Jaundicecasesoflessthan4weeksduration;
}
@@ -3799,6 +3879,10 @@
AFPcaseslessthan15yrsofage.addCommand(getAFPcaseslessthan15yrsofageokcmd());
AFPcaseslessthan15yrsofage.setCommandListener(this);//GEN-END:|914-getter|1|914-postInit
// write post-init user code here
+ if ( AFPcaseslessthan15yrsofage instanceof Form )
+ {
+ ((Form) AFPcaseslessthan15yrsofage).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|914-getter|2|
return AFPcaseslessthan15yrsofage;
}
@@ -3819,6 +3903,10 @@
Unusualsymptomsleadingtodeath.addCommand(getUnusualsymptomsleadingtodeathokcmd());
Unusualsymptomsleadingtodeath.setCommandListener(this);//GEN-END:|919-getter|1|919-postInit
// write post-init user code here
+ if ( Unusualsymptomsleadingtodeath instanceof Form )
+ {
+ ((Form) Unusualsymptomsleadingtodeath).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|919-getter|2|
return Unusualsymptomsleadingtodeath;
}
@@ -5335,7 +5423,7 @@
public StringItem getStringItem12() {
if (stringItem12 == null) {//GEN-END:|1030-getter|0|1030-preInit
// write pre-init user code here
- stringItem12 = new StringItem("More than 3 weeks", null);//GEN-LINE:|1030-getter|1|1030-postInit
+ stringItem12 = new StringItem("More than 2 weeks", null);//GEN-LINE:|1030-getter|1|1030-postInit
// write post-init user code here
}//GEN-BEGIN:|1030-getter|2|
return stringItem12;
@@ -6135,6 +6223,147 @@
private boolean isEvenYear(int Year){
return Year%4==0?true:false;
}
+
+
+
+ /*
+ * Author: Thai Chuong Oct. 6th 2012
+ */
+ private boolean valueValidation(TextField myTextField, String[] mylist){
+ for (int i = 0; i < mylist.length; i++)
+ {
+ if (myTextField.getString().equalsIgnoreCase( mylist[i] ))
+ return false;
+ }
+ return true;
+
+ }
+
+ private void Validation (Item item, TextField myTextField){
+ if (item == myTextField)
+ {
+ String[] list = {"00"};
+ if(!valueValidation(myTextField, list) || (myTextField.getString().length() > 1 && Integer.parseInt(myTextField.getString()) == 0))
+ {
+ myTextField.setString( "0" );
+ Alert myAlert = new Alert("Wrong data","not allow!",null,AlertType.INFO);
+ myAlert.setTimeout(1500);
+ Display.getDisplay(this).setCurrent(myAlert,getDisplay().getCurrent());
+ }
+ }
+ }
+
+ /*
+ * Author: Thai Chuong Oct. 6th 2012
+ */
+ public void itemStateChanged( Item item )
+ {
+ Validation(item, textField);
+ Validation(item, textField1);
+ Validation(item, textField2);
+ Validation(item, textField3);
+ Validation(item, textField4);
+ Validation(item, textField5);
+ Validation(item, textField6);
+ Validation(item, textField7);
+ Validation(item, textField8);
+ Validation(item, textField9);
+ Validation(item, textField10);
+ Validation(item, textField11);
+ Validation(item, textField12);
+ Validation(item, textField13);
+ Validation(item, textField14);
+ Validation(item, textField15);
+ Validation(item, textField16);
+ Validation(item, textField17);
+ Validation(item, textField18);
+ Validation(item, textField19);
+ Validation(item, textField20);
+ Validation(item, textField21);
+ Validation(item, textField22);
+ Validation(item, textField23);
+ Validation(item, textField24);
+ Validation(item, textField25);
+ Validation(item, textField26);
+ Validation(item, textField27);
+ Validation(item, textField28);
+ Validation(item, textField29);
+ Validation(item, textField30);
+ Validation(item, textField31);
+ Validation(item, textField32);
+ Validation(item, textField33);
+ Validation(item, textField34);
+ Validation(item, textField35);
+ Validation(item, textField36);
+ Validation(item, textField37);
+ Validation(item, textField38);
+ Validation(item, textField39);
+ Validation(item, textField40);
+ Validation(item, textField41);
+ Validation(item, textField42);
+ Validation(item, textField43);
+ Validation(item, textField44);
+ Validation(item, textField45);
+ Validation(item, textField46);
+ Validation(item, textField47);
+ Validation(item, textField48);
+ Validation(item, textField49);
+ Validation(item, textField50);
+ Validation(item, textField51);
+ Validation(item, textField52);
+ Validation(item, textField53);
+ Validation(item, textField54);
+ Validation(item, textField55);
+ Validation(item, textField56);
+ Validation(item, textField57);
+ Validation(item, textField58);
+ Validation(item, textField59);
+ Validation(item, textField60);
+ Validation(item, textField61);
+ Validation(item, textField61);
+ Validation(item, textField63);
+ Validation(item, textField64);
+ Validation(item, textField65);
+ Validation(item, textField66);
+ Validation(item, textField67);
+ Validation(item, textField68);
+ Validation(item, textField69);
+ Validation(item, textField70);
+ Validation(item, textField71);
+ Validation(item, textField72);
+ Validation(item, textField73);
+ Validation(item, textField74);
+ Validation(item, textField75);
+ Validation(item, textField76);
+ Validation(item, textField77);
+ Validation(item, textField78);
+ Validation(item, textField79);
+ Validation(item, textField80);
+ Validation(item, textField81);
+ Validation(item, textField82);
+ Validation(item, textField83);
+ Validation(item, textField84);
+ Validation(item, textField85);
+ Validation(item, textField86);
+ Validation(item, textField87);
+ Validation(item, textField88);
+ Validation(item, textField89);
+ Validation(item, textField90);
+ Validation(item, textField91);
+ Validation(item, textField92);
+ Validation(item, textField93);
+ Validation(item, textField94);
+ Validation(item, textField95);
+ Validation(item, textField96);
+ Validation(item, textField97);
+ Validation(item, textField98);
+ Validation(item, textField99);
+ Validation(item, textField100);
+ Validation(item, textField101);
+ Validation(item, textField102);
+ Validation(item, textField103);
+
+ }
}
=== modified file 'local/in/dhis-mobile/J2ME/HP/IDSP jar S_1/SCForm1/src/org/hispindia/mobile/SCForm1.vmd'
--- local/in/dhis-mobile/J2ME/HP/IDSP jar S_1/SCForm1/src/org/hispindia/mobile/SCForm1.vmd 2012-05-23 06:15:36 +0000
+++ local/in/dhis-mobile/J2ME/HP/IDSP jar S_1/SCForm1/src/org/hispindia/mobile/SCForm1.vmd 2012-10-06 11:36:56 +0000
@@ -791,7 +791,7 @@
<Component componentID="1030" typeID="Cjavax.microedition.lcdui.StringItem">
<Property name="instanceName" typeID="Pjava.lang.String" value="VstringItem12"/>
<Property name="codeGenerated" typeID="Pboolean" value="Vtrue"/>
- <Property name="label" typeID="Pjava.lang.String" value="VMore than 3 weeks"/>
+ <Property name="label" typeID="Pjava.lang.String" value="VMore than 2 weeks"/>
<Property name="itemCommandListener" typeID="C#ItemCommandListener" value="R8"/>
</Component>
<Component componentID="804" typeID="Cjavax.microedition.lcdui.TextField">
@@ -967,7 +967,7 @@
<Component componentID="782" typeID="Cjavax.microedition.lcdui.StringItem">
<Property name="instanceName" typeID="Pjava.lang.String" value="VstringItem4"/>
<Property name="codeGenerated" typeID="Pboolean" value="Vtrue"/>
- <Property name="label" typeID="Pjava.lang.String" value="VLess than 3 weeks"/>
+ <Property name="label" typeID="Pjava.lang.String" value="VLess than 2 weeks"/>
<Property name="itemCommandListener" typeID="C#ItemCommandListener" value="R8"/>
</Component>
<Component componentID="781" typeID="C#CommandEventSource">
@@ -2584,35 +2584,35 @@
</Component>
</Document>
<FlowScene version="1">
+ <Node componentID="897" descriptorID="componentNode897" x="902" y="2032"/>
+ <Node componentID="806" descriptorID="componentNode806" x="-29" y="350"/>
+ <Node componentID="233" descriptorID="componentNode233" x="322" y="-187"/>
+ <Node componentID="711" descriptorID="componentNode711" x="317" y="404"/>
+ <Node componentID="882" descriptorID="componentNode882" x="475" y="1718"/>
+ <Node componentID="654" descriptorID="componentNode654" x="515" y="116"/>
<Node componentID="219" descriptorID="componentNode219" x="141" y="152"/>
- <Node componentID="755" descriptorID="componentNode755" x="668" y="700"/>
- <Node componentID="233" descriptorID="componentNode233" x="322" y="-187"/>
- <Node componentID="764" descriptorID="componentNode764" x="585" y="1047"/>
+ <Node componentID="838" descriptorID="componentNode838" x="511" y="238"/>
+ <Node componentID="793" descriptorID="componentNode793" x="491" y="1246"/>
+ <Node componentID="741" descriptorID="componentNode741" x="494" y="805"/>
+ <Node componentID="178" descriptorID="componentNode178" x="320" y="24"/>
+ <Node componentID="777" descriptorID="componentNode777" x="751" y="1156"/>
+ <Node componentID="902" descriptorID="componentNode902" x="464" y="2154"/>
+ <Node componentID="872" descriptorID="componentNode872" x="483" y="1488"/>
<Node componentID="1010" descriptorID="componentNode1010" x="195" y="276"/>
+ <Node componentID="732" descriptorID="componentNode732" x="428" y="608"/>
+ <Node componentID="722" descriptorID="componentNode722" x="645" y="501"/>
+ <Node componentID="867" descriptorID="componentNode867" x="833" y="1361"/>
+ <Node componentID="919" descriptorID="componentNode919" x="1049" y="2465"/>
+ <Node componentID="877" descriptorID="componentNode877" x="890" y="1606"/>
+ <Node componentID="202" descriptorID="componentNode202" x="23" y="16"/>
<Node componentID="847" descriptorID="componentNode847" x="705" y="927"/>
- <Node componentID="892" descriptorID="componentNode892" x="453" y="1919"/>
- <Node componentID="838" descriptorID="componentNode838" x="511" y="238"/>
- <Node componentID="806" descriptorID="componentNode806" x="-29" y="350"/>
- <Node componentID="167" descriptorID="componentNode167" x="1039" y="-4"/>
- <Node componentID="872" descriptorID="componentNode872" x="483" y="1488"/>
<Node componentID="887" descriptorID="componentNode887" x="904" y="1838"/>
- <Node componentID="897" descriptorID="componentNode897" x="902" y="2032"/>
<Node componentID="909" descriptorID="componentNode909" x="793" y="2250"/>
- <Node componentID="793" descriptorID="componentNode793" x="491" y="1246"/>
- <Node componentID="202" descriptorID="componentNode202" x="23" y="16"/>
<Node componentID="2" descriptorID="componentNode2" x="17" y="-160"/>
- <Node componentID="722" descriptorID="componentNode722" x="645" y="501"/>
+ <Node componentID="167" descriptorID="componentNode167" x="1039" y="-4"/>
+ <Node componentID="764" descriptorID="componentNode764" x="585" y="1047"/>
+ <Node componentID="892" descriptorID="componentNode892" x="453" y="1919"/>
+ <Node componentID="755" descriptorID="componentNode755" x="668" y="700"/>
<Node componentID="914" descriptorID="componentNode914" x="479" y="2347"/>
- <Node componentID="777" descriptorID="componentNode777" x="751" y="1156"/>
- <Node componentID="654" descriptorID="componentNode654" x="515" y="116"/>
- <Node componentID="919" descriptorID="componentNode919" x="1049" y="2465"/>
- <Node componentID="732" descriptorID="componentNode732" x="428" y="608"/>
- <Node componentID="711" descriptorID="componentNode711" x="317" y="404"/>
- <Node componentID="877" descriptorID="componentNode877" x="890" y="1606"/>
- <Node componentID="741" descriptorID="componentNode741" x="494" y="805"/>
- <Node componentID="178" descriptorID="componentNode178" x="320" y="24"/>
- <Node componentID="902" descriptorID="componentNode902" x="464" y="2154"/>
- <Node componentID="882" descriptorID="componentNode882" x="475" y="1718"/>
- <Node componentID="867" descriptorID="componentNode867" x="833" y="1361"/>
</FlowScene>
</VisualDesign>
=== modified file 'local/in/dhis-mobile/J2ME/HP/MORTALITY/SCForm1/nbproject/private/private.properties'
--- local/in/dhis-mobile/J2ME/HP/MORTALITY/SCForm1/nbproject/private/private.properties 2012-05-23 06:15:36 +0000
+++ local/in/dhis-mobile/J2ME/HP/MORTALITY/SCForm1/nbproject/private/private.properties 2012-10-06 11:36:56 +0000
@@ -1,8 +1,8 @@
-#Wed, 02 May 2012 10:31:35 +0530
+#Sat, 06 Oct 2012 17:33:08 +0700
#Sat Jun 26 20:02:35 IST 2010
-netbeans.user=C\:\\Users\\ARUNIMA\\.netbeans\\7.1
+netbeans.user=C\:\\Users\\Thai Chuong\\.netbeans\\7.1
javadoc.preview=true
config.active=
-deployment.counter=275
+deployment.counter=277
app-version.autoincrement=true
-deployment.number=0.2.74
+deployment.number=0.2.76
=== modified file 'local/in/dhis-mobile/J2ME/HP/MORTALITY/SCForm1/nbproject/private/private.xml'
--- local/in/dhis-mobile/J2ME/HP/MORTALITY/SCForm1/nbproject/private/private.xml 2012-05-23 06:15:36 +0000
+++ local/in/dhis-mobile/J2ME/HP/MORTALITY/SCForm1/nbproject/private/private.xml 2012-10-06 11:36:56 +0000
@@ -6,4 +6,7 @@
<line>258</line>
</file>
</editor-bookmarks>
+ <open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/1">
+ <file>file:/D:/DHIS%20trunk/local/in/dhis-mobile/J2ME/HP/MORTALITY/SCForm1/src/org/hispindia/mobile/SCForm1.java</file>
+ </open-files>
</project-private>
=== modified file 'local/in/dhis-mobile/J2ME/HP/MORTALITY/SCForm1/src/org/hispindia/mobile/SCForm1.java'
--- local/in/dhis-mobile/J2ME/HP/MORTALITY/SCForm1/src/org/hispindia/mobile/SCForm1.java 2012-05-23 06:15:36 +0000
+++ local/in/dhis-mobile/J2ME/HP/MORTALITY/SCForm1/src/org/hispindia/mobile/SCForm1.java 2012-10-06 11:36:56 +0000
@@ -16,7 +16,7 @@
import javax.wireless.messaging.TextMessage;
import org.netbeans.microedition.lcdui.SplashScreen;
-public class SCForm1 extends MIDlet implements CommandListener {
+public class SCForm1 extends MIDlet implements CommandListener, ItemStateListener {
private boolean midletPaused = false;
private boolean editingLastReport = false;
@@ -1209,6 +1209,10 @@
Mortalitydetails_infants.addCommand(getMortalitydatails_infantsCmd());
Mortalitydetails_infants.setCommandListener(this);//GEN-END:|525-getter|1|525-postInit
// write post-init user code here
+ if ( Mortalitydetails_infants instanceof Form )
+ {
+ ((Form) Mortalitydetails_infants).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|525-getter|2|
return Mortalitydetails_infants;
}
@@ -1229,6 +1233,10 @@
Infantdeathsupto4weeksbycause.addCommand(getInfantdeathsupto4weeksbycauseCmd());
Infantdeathsupto4weeksbycause.setCommandListener(this);//GEN-END:|530-getter|1|530-postInit
// write post-init user code here
+ if ( Infantdeathsupto4weeksbycause instanceof Form )
+ {
+ ((Form) Infantdeathsupto4weeksbycause).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|530-getter|2|
return Infantdeathsupto4weeksbycause;
}
@@ -1249,6 +1257,10 @@
Infantchilddeathsupto5yearsbycause.addCommand(getInfantchilddeathsupto5yearsbycauseCmd());
Infantchilddeathsupto5yearsbycause.setCommandListener(this);//GEN-END:|535-getter|1|535-postInit
// write post-init user code here
+ if ( Infantchilddeathsupto5yearsbycause instanceof Form )
+ {
+ ((Form) Infantchilddeathsupto5yearsbycause).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|535-getter|2|
return Infantchilddeathsupto5yearsbycause;
}
@@ -1269,6 +1281,10 @@
AdolescentAdultdeathsbycause.addCommand(getAdolescentAdultdeathsbycauseCmd());
AdolescentAdultdeathsbycause.setCommandListener(this);//GEN-END:|540-getter|1|540-postInit
// write post-init user code here
+ if ( AdolescentAdultdeathsbycause instanceof Form )
+ {
+ ((Form) AdolescentAdultdeathsbycause).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|540-getter|2|
return AdolescentAdultdeathsbycause;
}
@@ -1288,6 +1304,10 @@
MaternalDeaths.addCommand(getMaternalDeathsCmd());
MaternalDeaths.setCommandListener(this);//GEN-END:|545-getter|1|545-postInit
// write post-init user code here
+ if ( MaternalDeaths instanceof Form )
+ {
+ ((Form) MaternalDeaths).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|545-getter|2|
return MaternalDeaths;
}
@@ -2073,6 +2093,10 @@
AdolescentAdultdeathsbycause1.addCommand(getAdolescentAdultdeathsbycauseCmd01());
AdolescentAdultdeathsbycause1.setCommandListener(this);//GEN-END:|603-getter|1|603-postInit
// write post-init user code here
+ if ( AdolescentAdultdeathsbycause1 instanceof Form )
+ {
+ ((Form) AdolescentAdultdeathsbycause1).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|603-getter|2|
return AdolescentAdultdeathsbycause1;
}
@@ -2331,6 +2355,10 @@
AdolescentAdultdeathsbycause2.addCommand(getAdolescentAdultdeathsbycauseCmd02());
AdolescentAdultdeathsbycause2.setCommandListener(this);//GEN-END:|604-getter|1|604-postInit
// write post-init user code here
+ if ( AdolescentAdultdeathsbycause2 instanceof Form )
+ {
+ ((Form) AdolescentAdultdeathsbycause2).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|604-getter|2|
return AdolescentAdultdeathsbycause2;
}
@@ -3315,6 +3343,108 @@
return true;
}
+ /*
+ * Author: Thai Chuong Oct. 6th 2012
+ */
+ private boolean valueValidation(TextField myTextField, String[] mylist){
+ for (int i = 0; i < mylist.length; i++)
+ {
+ if (myTextField.getString().equalsIgnoreCase( mylist[i] ))
+ return false;
+ }
+ return true;
+
+ }
+
+ private void Validation (Item item, TextField myTextField){
+ if (item == myTextField)
+ {
+ String[] list = {"00"};
+ if(!valueValidation(myTextField, list) || (myTextField.getString().length() > 1 && Integer.parseInt(myTextField.getString()) == 0))
+ {
+ myTextField.setString( "" );
+ Alert myAlert = new Alert("Wrong data","not allow!",null,AlertType.INFO);
+ myAlert.setTimeout(1500);
+ Display.getDisplay(this).setCurrent(myAlert,getDisplay().getCurrent());
+ }
+ }
+ }
+
+ /*
+ * Author: Thai Chuong Oct. 6th 2012
+ */
+ public void itemStateChanged( Item item )
+ {
+ Validation(item, textField);
+ Validation(item, textField1);
+ Validation(item, textField2);
+ Validation(item, textField3);
+ Validation(item, textField4);
+ Validation(item, textField5);
+ Validation(item, textField6);
+ Validation(item, textField7);
+ Validation(item, textField8);
+ Validation(item, textField9);
+ Validation(item, textField10);
+ Validation(item, textField11);
+ Validation(item, textField12);
+ Validation(item, textField13);
+ Validation(item, textField14);
+ Validation(item, textField15);
+ Validation(item, textField16);
+ Validation(item, textField17);
+ Validation(item, textField18);
+ Validation(item, textField19);
+ Validation(item, textField20);
+ Validation(item, textField21);
+ Validation(item, textField22);
+ Validation(item, textField23);
+ Validation(item, textField24);
+ Validation(item, textField25);
+ Validation(item, textField26);
+ Validation(item, textField27);
+ Validation(item, textField28);
+ Validation(item, textField29);
+ Validation(item, textField30);
+ Validation(item, textField31);
+ Validation(item, textField32);
+ Validation(item, textField33);
+ Validation(item, textField34);
+ Validation(item, textField35);
+ Validation(item, textField36);
+ Validation(item, textField37);
+ Validation(item, textField38);
+ Validation(item, textField39);
+ Validation(item, textField40);
+ Validation(item, textField41);
+ Validation(item, textField42);
+ Validation(item, textField43);
+ Validation(item, textField44);
+ Validation(item, textField45);
+ Validation(item, textField46);
+ Validation(item, textField47);
+ Validation(item, textField48);
+ Validation(item, textField49);
+ Validation(item, textField50);
+ Validation(item, textField51);
+ Validation(item, textField52);
+ Validation(item, textField53);
+ Validation(item, textField54);
+ Validation(item, textField55);
+ Validation(item, textField56);
+ Validation(item, textField57);
+ Validation(item, textField58);
+ Validation(item, textField59);
+ Validation(item, textField60);
+ Validation(item, textField61);
+ Validation(item, textField61);
+ Validation(item, textField63);
+ Validation(item, textField64);
+ Validation(item, textField65);
+
+ }
+
+
}
=== modified file 'local/in/dhis-mobile/J2ME/HP/MORTALITY/SCForm1/src/org/hispindia/mobile/SCForm1.vmd'
--- local/in/dhis-mobile/J2ME/HP/MORTALITY/SCForm1/src/org/hispindia/mobile/SCForm1.vmd 2012-05-23 06:15:36 +0000
+++ local/in/dhis-mobile/J2ME/HP/MORTALITY/SCForm1/src/org/hispindia/mobile/SCForm1.vmd 2012-10-06 11:36:56 +0000
@@ -1320,19 +1320,19 @@
</Component>
</Document>
<FlowScene version="1">
- <Node componentID="535" descriptorID="componentNode535" x="546" y="351"/>
- <Node componentID="202" descriptorID="componentNode202" x="31" y="229"/>
+ <Node componentID="530" descriptorID="componentNode530" x="758" y="205"/>
+ <Node componentID="525" descriptorID="componentNode525" x="569" y="44"/>
+ <Node componentID="2" descriptorID="componentNode2" x="15" y="23"/>
<Node componentID="219" descriptorID="componentNode219" x="18" y="419"/>
- <Node componentID="2" descriptorID="componentNode2" x="15" y="23"/>
- <Node componentID="530" descriptorID="componentNode530" x="758" y="205"/>
- <Node componentID="604" descriptorID="componentNode604" x="808" y="818"/>
<Node componentID="540" descriptorID="componentNode540" x="762" y="524"/>
- <Node componentID="525" descriptorID="componentNode525" x="569" y="44"/>
- <Node componentID="167" descriptorID="componentNode167" x="353" y="383"/>
+ <Node componentID="603" descriptorID="componentNode603" x="585" y="682"/>
<Node componentID="654" descriptorID="componentNode654" x="133" y="600"/>
+ <Node componentID="202" descriptorID="componentNode202" x="31" y="229"/>
+ <Node componentID="535" descriptorID="componentNode535" x="546" y="351"/>
<Node componentID="545" descriptorID="componentNode545" x="641" y="950"/>
- <Node componentID="603" descriptorID="componentNode603" x="585" y="682"/>
<Node componentID="178" descriptorID="componentNode178" x="279" y="189"/>
+ <Node componentID="167" descriptorID="componentNode167" x="353" y="383"/>
+ <Node componentID="604" descriptorID="componentNode604" x="808" y="818"/>
<Node componentID="233" descriptorID="componentNode233" x="281" y="27"/>
</FlowScene>
</VisualDesign>
=== modified file 'local/in/dhis-mobile/J2ME/HP/PHC/SCForm1/nbproject/private/private.properties'
--- local/in/dhis-mobile/J2ME/HP/PHC/SCForm1/nbproject/private/private.properties 2012-05-23 06:15:36 +0000
+++ local/in/dhis-mobile/J2ME/HP/PHC/SCForm1/nbproject/private/private.properties 2012-10-06 11:36:56 +0000
@@ -1,8 +1,8 @@
-#Wed, 02 May 2012 11:53:37 +0530
+#Sat, 06 Oct 2012 18:22:05 +0700
#Sat Jun 26 20:02:35 IST 2010
-netbeans.user=C\:\\Users\\ARUNIMA\\.netbeans\\7.1
+netbeans.user=C\:\\Users\\Thai Chuong\\.netbeans\\7.1
javadoc.preview=true
config.active=
-deployment.counter=352
+deployment.counter=354
app-version.autoincrement=true
-deployment.number=0.3.51
+deployment.number=0.3.53
=== modified file 'local/in/dhis-mobile/J2ME/HP/PHC/SCForm1/src/org/hispindia/mobile/SCForm1.java'
--- local/in/dhis-mobile/J2ME/HP/PHC/SCForm1/src/org/hispindia/mobile/SCForm1.java 2012-05-23 06:15:36 +0000
+++ local/in/dhis-mobile/J2ME/HP/PHC/SCForm1/src/org/hispindia/mobile/SCForm1.java 2012-10-06 11:36:56 +0000
@@ -16,7 +16,7 @@
import javax.wireless.messaging.TextMessage;
import org.netbeans.microedition.lcdui.SplashScreen;
-public class SCForm1 extends MIDlet implements CommandListener {
+public class SCForm1 extends MIDlet implements CommandListener, ItemStateListener {
private boolean midletPaused = false;
private boolean editingLastReport = false;
@@ -1947,6 +1947,10 @@
Childhooddiseases05yrs.addCommand(getChildhooddiseases05yrsokcmd());
Childhooddiseases05yrs.setCommandListener(this);//GEN-END:|774-getter|1|774-postInit
// write post-init user code here
+ if ( Childhooddiseases05yrs instanceof Form )
+ {
+ ((Form) Childhooddiseases05yrs).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|774-getter|2|
return Childhooddiseases05yrs;
}
@@ -1966,6 +1970,10 @@
BlindnessControlProgramme.addCommand(getBlindnessControlProgrammeokcmd());
BlindnessControlProgramme.setCommandListener(this);//GEN-END:|775-getter|1|775-postInit
// write post-init user code here
+ if ( BlindnessControlProgramme instanceof Form )
+ {
+ ((Form) BlindnessControlProgramme).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|775-getter|2|
return BlindnessControlProgramme;
}
@@ -1985,6 +1993,10 @@
PatientServices.addCommand(getPatientServicesokcmd());
PatientServices.setCommandListener(this);//GEN-END:|784-getter|1|784-postInit
// write post-init user code here
+ if ( PatientServices instanceof Form )
+ {
+ ((Form) PatientServices).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|784-getter|2|
return PatientServices;
}
@@ -2004,6 +2016,10 @@
InPatientAdmissions.addCommand(getInPatientAdmissionsokcmd());
InPatientAdmissions.setCommandListener(this);//GEN-END:|789-getter|1|789-postInit
// write post-init user code here
+ if ( InPatientAdmissions instanceof Form )
+ {
+ ((Form) InPatientAdmissions).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|789-getter|2|
return InPatientAdmissions;
}
@@ -2023,6 +2039,10 @@
LaboratoryTesting.addCommand(getLaboratoryTestingokcmd());
LaboratoryTesting.setCommandListener(this);//GEN-END:|794-getter|1|794-postInit
// write post-init user code here
+ if ( LaboratoryTesting instanceof Form )
+ {
+ ((Form) LaboratoryTesting).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|794-getter|2|
return LaboratoryTesting;
}
@@ -2514,6 +2534,10 @@
PSDeaths.addCommand(getPsDeathsokcmd());
PSDeaths.setCommandListener(this);//GEN-END:|822-getter|1|822-postInit
// write post-init user code here
+ if ( PSDeaths instanceof Form )
+ {
+ ((Form) PSDeaths).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|822-getter|2|
return PSDeaths;
}
@@ -2534,6 +2558,10 @@
InPatientHeadCountatmidnight.addCommand(getInPatientHeadCountatmidnightokcmd());
InPatientHeadCountatmidnight.setCommandListener(this);//GEN-END:|823-getter|1|823-postInit
// write post-init user code here
+ if ( InPatientHeadCountatmidnight instanceof Form )
+ {
+ ((Form) InPatientHeadCountatmidnight).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|823-getter|2|
return InPatientHeadCountatmidnight;
}
@@ -2553,6 +2581,10 @@
OperationTheatre.addCommand(getOperationTheatreokcmd());
OperationTheatre.setCommandListener(this);//GEN-END:|824-getter|1|824-postInit
// write post-init user code here
+ if ( OperationTheatre instanceof Form )
+ {
+ ((Form) OperationTheatre).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|824-getter|2|
return OperationTheatre;
}
@@ -2572,6 +2604,10 @@
OthersDenlOphAYUSHetc.addCommand(getOthersetcokcmd());
OthersDenlOphAYUSHetc.setCommandListener(this);//GEN-END:|825-getter|1|825-postInit
// write post-init user code here
+ if ( OthersDenlOphAYUSHetc instanceof Form )
+ {
+ ((Form) OthersDenlOphAYUSHetc).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|825-getter|2|
return OthersDenlOphAYUSHetc;
}
@@ -2591,6 +2627,10 @@
Widaltestsconducted.addCommand(getWidaltestsconductedokcmd());
Widaltestsconducted.setCommandListener(this);//GEN-END:|826-getter|1|826-postInit
// write post-init user code here
+ if ( Widaltestsconducted instanceof Form )
+ {
+ ((Form) Widaltestsconducted).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|826-getter|2|
return Widaltestsconducted;
}
@@ -2610,6 +2650,10 @@
VDRLtestsconducted.addCommand(getVDRLtestsconductedokcmd());
VDRLtestsconducted.setCommandListener(this);//GEN-END:|847-getter|1|847-postInit
// write post-init user code here
+ if ( VDRLtestsconducted instanceof Form )
+ {
+ ((Form) VDRLtestsconducted).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|847-getter|2|
return VDRLtestsconducted;
}
@@ -2629,6 +2673,10 @@
Malariatestsconducted.addCommand(getMalariatestsconductedokcmd());
Malariatestsconducted.setCommandListener(this);//GEN-END:|848-getter|1|848-postInit
// write post-init user code here
+ if ( Malariatestsconducted instanceof Form )
+ {
+ ((Form) Malariatestsconducted).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|848-getter|2|
return Malariatestsconducted;
}
@@ -3769,6 +3817,10 @@
Outpatient.addCommand(getOutpatientCmd());
Outpatient.setCommandListener(this);//GEN-END:|1002-getter|1|1002-postInit
// write post-init user code here
+ if ( Outpatient instanceof Form )
+ {
+ ((Form) Outpatient).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|1002-getter|2|
return Outpatient;
}
@@ -3821,6 +3873,10 @@
HIVtestsconducted.addCommand(getHIVtestsconductedCmd());
HIVtestsconducted.setCommandListener(this);//GEN-END:|1009-getter|1|1009-postInit
// write post-init user code here
+ if ( HIVtestsconducted instanceof Form )
+ {
+ ((Form) HIVtestsconducted).setItemStateListener( (ItemStateListener) this );
+ }
}//GEN-BEGIN:|1009-getter|2|
return HIVtestsconducted;
}
@@ -4486,4 +4542,90 @@
}
return true;
}
+
+ /*
+ * Author: Thai Chuong Oct. 6th 2012
+ */
+ private boolean valueValidation(TextField myTextField, String[] mylist){
+ for (int i = 0; i < mylist.length; i++)
+ {
+ if (myTextField.getString().equalsIgnoreCase( mylist[i] ))
+ return false;
+ }
+ return true;
+
+ }
+
+ private void Validation (Item item, TextField myTextField){
+ if (item == myTextField)
+ {
+ String[] list = {"00"};
+ if(!valueValidation(myTextField, list) || (myTextField.getString().length() > 1 && Integer.parseInt(myTextField.getString()) == 0))
+ {
+ myTextField.setString( "" );
+ Alert myAlert = new Alert("Wrong data","not allow!",null,AlertType.INFO);
+ myAlert.setTimeout(1500);
+ Display.getDisplay(this).setCurrent(myAlert,getDisplay().getCurrent());
+ }
+ }
+ }
+
+ /*
+ * Author: Thai Chuong Oct. 6th 2012
+ */
+ public void itemStateChanged( Item item )
+ {
+ Validation(item, textField);
+ Validation(item, textField1);
+ Validation(item, textField2);
+ Validation(item, textField3);
+ Validation(item, textField4);
+ Validation(item, textField5);
+ Validation(item, textField6);
+ Validation(item, textField7);
+ Validation(item, textField8);
+ Validation(item, textField9);
+
+ Validation(item, textField11);
+
+ Validation(item, textField20);
+ Validation(item, textField21);
+ Validation(item, textField22);
+ Validation(item, textField23);
+ Validation(item, textField24);
+ Validation(item, textField25);
+ Validation(item, textField26);
+ Validation(item, textField27);
+ Validation(item, textField28);
+ Validation(item, textField29);
+
+ Validation(item, textField32);
+ Validation(item, textField33);
+ Validation(item, textField34);
+ Validation(item, textField35);
+
+ Validation(item, textField37);
+
+ Validation(item, textField40);
+ Validation(item, textField41);
+ Validation(item, textField42);
+ Validation(item, textField43);
+ Validation(item, textField44);
+ Validation(item, textField45);
+ Validation(item, textField46);
+ Validation(item, textField47);
+ Validation(item, textField48);
+ Validation(item, textField49);
+ Validation(item, textField50);
+ Validation(item, textField51);
+ Validation(item, textField52);
+ Validation(item, textField53);
+ Validation(item, textField58);
+ Validation(item, textField59);
+ Validation(item, textField60);
+ Validation(item, textField61);
+ Validation(item, textField61);
+ Validation(item, textField63);
+ Validation(item, textField64);
+ }
}
\ No newline at end of file
=== modified file 'local/in/dhis-mobile/J2ME/HP/PHC/SCForm1/src/org/hispindia/mobile/SCForm1.vmd'
--- local/in/dhis-mobile/J2ME/HP/PHC/SCForm1/src/org/hispindia/mobile/SCForm1.vmd 2012-05-23 06:15:36 +0000
+++ local/in/dhis-mobile/J2ME/HP/PHC/SCForm1/src/org/hispindia/mobile/SCForm1.vmd 2012-10-06 11:36:56 +0000
@@ -1338,18 +1338,18 @@
<Property name="label" typeID="Pjava.lang.String" value="VOk"/>
<Property name="type" typeID="Pint" value="V4"/>
</Component>
+ <Component componentID="662" typeID="Cjavax.microedition.lcdui.Command">
+ <Property name="instanceName" typeID="Pjava.lang.String" value="VvitaminadoseBackCmd"/>
+ <Property name="codeGenerated" typeID="Pboolean" value="Vtrue"/>
+ <Property name="label" typeID="Pjava.lang.String" value="VBack"/>
+ <Property name="type" typeID="Pint" value="V2"/>
+ </Component>
<Component componentID="176" typeID="C#SplashScreenDismissCommand">
<Property name="label" typeID="Pjava.lang.String" value="VDismiss"/>
<Property name="type" typeID="Pint" value="V4"/>
<Property name="priority" typeID="Pint" value="V0"/>
<Property name="ordinary" typeID="Pboolean" value="Vfalse"/>
</Component>
- <Component componentID="662" typeID="Cjavax.microedition.lcdui.Command">
- <Property name="instanceName" typeID="Pjava.lang.String" value="VvitaminadoseBackCmd"/>
- <Property name="codeGenerated" typeID="Pboolean" value="Vtrue"/>
- <Property name="label" typeID="Pjava.lang.String" value="VBack"/>
- <Property name="type" typeID="Pint" value="V2"/>
- </Component>
<Component componentID="745" typeID="Cjavax.microedition.lcdui.Command">
<Property name="instanceName" typeID="Pjava.lang.String" value="VCsectiondeliveriesokcmd"/>
<Property name="codeGenerated" typeID="Pboolean" value="Vtrue"/>
@@ -1446,18 +1446,18 @@
<Property name="label" typeID="Pjava.lang.String" value="VBack"/>
<Property name="type" typeID="Pint" value="V2"/>
</Component>
+ <Component componentID="709" typeID="Cjavax.microedition.lcdui.Command">
+ <Property name="instanceName" typeID="Pjava.lang.String" value="VmenstrualhygieneprogrammeCmd"/>
+ <Property name="codeGenerated" typeID="Pboolean" value="Vtrue"/>
+ <Property name="label" typeID="Pjava.lang.String" value="VNext"/>
+ <Property name="type" typeID="Pint" value="V4"/>
+ </Component>
<Component componentID="227" typeID="Cjavax.microedition.lcdui.Command">
<Property name="instanceName" typeID="Pjava.lang.String" value="VloadExitCmd"/>
<Property name="codeGenerated" typeID="Pboolean" value="Vtrue"/>
<Property name="label" typeID="Pjava.lang.String" value="VExit"/>
<Property name="type" typeID="Pint" value="V7"/>
</Component>
- <Component componentID="709" typeID="Cjavax.microedition.lcdui.Command">
- <Property name="instanceName" typeID="Pjava.lang.String" value="VmenstrualhygieneprogrammeCmd"/>
- <Property name="codeGenerated" typeID="Pboolean" value="Vtrue"/>
- <Property name="label" typeID="Pjava.lang.String" value="VNext"/>
- <Property name="type" typeID="Pint" value="V4"/>
- </Component>
<Component componentID="225" typeID="Cjavax.microedition.lcdui.Command">
<Property name="instanceName" typeID="Pjava.lang.String" value="VloadCmd"/>
<Property name="codeGenerated" typeID="Pboolean" value="Vtrue"/>
@@ -1789,26 +1789,26 @@
</Component>
</Document>
<FlowScene version="1">
+ <Node componentID="825" descriptorID="componentNode825" x="728" y="2186"/>
+ <Node componentID="774" descriptorID="componentNode774" x="1043" y="1298"/>
+ <Node componentID="202" descriptorID="componentNode202" x="438" y="-160"/>
+ <Node componentID="2" descriptorID="componentNode2" x="90" y="39"/>
+ <Node componentID="724" descriptorID="componentNode724" x="598" y="-64"/>
+ <Node componentID="822" descriptorID="componentNode822" x="1102" y="1724"/>
+ <Node componentID="1009" descriptorID="componentNode1009" x="829" y="2440"/>
+ <Node componentID="784" descriptorID="componentNode784" x="1072" y="1532"/>
+ <Node componentID="178" descriptorID="componentNode178" x="790" y="162"/>
+ <Node componentID="824" descriptorID="componentNode824" x="1120" y="2074"/>
<Node componentID="794" descriptorID="componentNode794" x="1073" y="2280"/>
+ <Node componentID="826" descriptorID="componentNode826" x="983" y="2620"/>
<Node componentID="823" descriptorID="componentNode823" x="823" y="1875"/>
- <Node componentID="826" descriptorID="componentNode826" x="983" y="2620"/>
- <Node componentID="824" descriptorID="componentNode824" x="1120" y="2074"/>
- <Node componentID="1009" descriptorID="componentNode1009" x="829" y="2440"/>
- <Node componentID="724" descriptorID="componentNode724" x="598" y="-64"/>
- <Node componentID="784" descriptorID="componentNode784" x="1072" y="1532"/>
- <Node componentID="848" descriptorID="componentNode848" x="344" y="2277"/>
- <Node componentID="825" descriptorID="componentNode825" x="728" y="2186"/>
+ <Node componentID="789" descriptorID="componentNode789" x="730" y="1630"/>
+ <Node componentID="775" descriptorID="componentNode775" x="822" y="1402"/>
+ <Node componentID="847" descriptorID="componentNode847" x="612" y="2733"/>
+ <Node componentID="167" descriptorID="componentNode167" x="106" y="193"/>
<Node componentID="233" descriptorID="componentNode233" x="-120" y="350"/>
- <Node componentID="167" descriptorID="componentNode167" x="106" y="193"/>
- <Node componentID="789" descriptorID="componentNode789" x="730" y="1630"/>
- <Node componentID="178" descriptorID="componentNode178" x="790" y="162"/>
- <Node componentID="2" descriptorID="componentNode2" x="90" y="39"/>
<Node componentID="1002" descriptorID="componentNode1002" x="707" y="1977"/>
- <Node componentID="847" descriptorID="componentNode847" x="612" y="2733"/>
- <Node componentID="774" descriptorID="componentNode774" x="1043" y="1298"/>
- <Node componentID="775" descriptorID="componentNode775" x="822" y="1402"/>
- <Node componentID="822" descriptorID="componentNode822" x="1102" y="1724"/>
- <Node componentID="202" descriptorID="componentNode202" x="438" y="-160"/>
+ <Node componentID="848" descriptorID="componentNode848" x="344" y="2277"/>
<Node componentID="219" descriptorID="componentNode219" x="311" y="79"/>
</FlowScene>
</VisualDesign>