dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #00714
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 192: dhismidp: Added exit warning & save msg. Added phone num validation.
------------------------------------------------------------
revno: 192
author: Saptarshi
committer: sunbiz <sunbiz@hispindia>
branch nick: trunk
timestamp: Sat 2009-04-18 16:18:13 +0530
message:
dhismidp: Added exit warning & save msg. Added phone num validation.
modified:
local/in/DHISMIDP/nbproject/build-impl.xml
local/in/DHISMIDP/nbproject/genfiles.properties
local/in/DHISMIDP/nbproject/private/private.properties
local/in/DHISMIDP/nbproject/project.properties
local/in/DHISMIDP/src/org/hispindia/mobile/ANMApp.java
local/in/DHISMIDP/src/org/hispindia/mobile/ANMApp.vmd
local/in/SMSListener/nbproject/build-impl.xml
local/in/SMSListener/nbproject/genfiles.properties
=== modified file 'local/in/DHISMIDP/nbproject/build-impl.xml'
--- local/in/DHISMIDP/nbproject/build-impl.xml 2009-04-10 16:30:05 +0000
+++ local/in/DHISMIDP/nbproject/build-impl.xml 2009-04-18 10:48:13 +0000
@@ -353,7 +353,7 @@
<equals arg1="${bdj.deployment.dir}" arg2="" trim="true"/>
</or>
</condition>
- <fail if="bdj.deployment.dir.invalid">Deployment directory is set!</fail>
+ <fail if="bdj.deployment.dir.invalid">Deployment directory is not set!</fail>
<property name="deployment.dir" location="${dist.dir}"/>
<patternset id="deployment.patternset">
<include name="${dist.jar}"/>
@@ -745,6 +745,7 @@
<property name="bdj.deployment.bdmv.backup.dir" value="${bdj.deployment.bdmv.dir}/BACKUP"/>
<property name="bdj.deployment.certificate.dir" value="${bdj.deployment.dir}/CERTIFICATE"/>
<property name="bdj.deployment.certificate.backup.dir" value="${bdj.deployment.certificate.dir}/BACKUP"/>
+ <mkdir dir="${bdj.deployment.dir}"/>
<mkdir dir="${bdj.deployment.bdmv.dir}"/>
<mkdir dir="${bdj.deployment.bdmv.dir}/AUXDATA"/>
<mkdir dir="${bdj.deployment.bdmv.dir}/BDJO"/>
@@ -1203,15 +1204,20 @@
<!--cdc-hi-debug-->
<target name="-pre-cdc-hi-debug" if="cdc-hi-platform.trigger"/>
<target name="-cdc-hi-debug" if="cdc-hi-platform.trigger">
- <echo message="Debug for CDC VM is not supported now, application will be only executed"/>
- <exec executable="${platform.home}/bin/emulator">
- <arg value="-cp"/>
- <arg value="${basedir}/${dist.dir}/${dist.jar}"/>
- <arg value="-Xdevice:${platform.device}"/>
- <arg value="${run.cmd.options}"/>
- <arg value="-Xmain:${main.class}"/>
- <arg value="${application.args}"/>
- </exec>
+ <taskdef name="freePortRetriever" classname="org.netbeans.modules.j2me.cdc.project.savaje.FreePortRetriever" classpath="${libs.savaje-ant-utils.classpath}"/>
+ <freePortRetriever debuggerPortProperty="active.debug.port"/>
+ <parallel>
+ <exec executable="${platform.home}/bin/emulator">
+ <arg value="-cp"/>
+ <arg value="${basedir}/${dist.dir}/${dist.jar}"/>
+ <arg value="-Xdevice:${platform.device}"/>
+ <arg value="-Xmain:${main.class}"/>
+ <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="30000" period="2000"/>
+ </parallel>
</target>
<target name="-post-cdc-hi-debug" if="cdc-hi-platform.trigger"/>
<target name="cdc-hi-debug" if="cdc-hi-platform.trigger" depends="-pre-cdc-hi-debug, -cdc-hi-debug, -post-cdc-hi-debug"/>
=== modified file 'local/in/DHISMIDP/nbproject/genfiles.properties'
--- local/in/DHISMIDP/nbproject/genfiles.properties 2009-04-10 16:30:05 +0000
+++ local/in/DHISMIDP/nbproject/genfiles.properties 2009-04-18 10:48:13 +0000
@@ -4,5 +4,5 @@
build.xml.script.CRC32=19ed359c
build.xml.stylesheet.CRC32=03eab09b
nbproject/build-impl.xml.data.CRC32=11f3acf4
-nbproject/build-impl.xml.script.CRC32=b0352d89
-nbproject/build-impl.xml.stylesheet.CRC32=e33a3817
+nbproject/build-impl.xml.script.CRC32=6cda5caf
+nbproject/build-impl.xml.stylesheet.CRC32=1bb89aac
=== modified file 'local/in/DHISMIDP/nbproject/private/private.properties'
--- local/in/DHISMIDP/nbproject/private/private.properties 2009-04-10 16:30:05 +0000
+++ local/in/DHISMIDP/nbproject/private/private.properties 2009-04-18 10:48:13 +0000
@@ -1,7 +1,7 @@
-#Tue Apr 07 18:03:10 IST 2009
+#Sat Apr 18 15:48:24 IST 2009
netbeans.user=/home/sunbiz/.netbeans/dev
javadoc.preview=true
-deployment.counter=81
config.active=
-deployment.number=0.0.80
+deployment.counter=86
app-version.autoincrement=true
+deployment.number=0.0.85
=== modified file 'local/in/DHISMIDP/nbproject/project.properties'
--- local/in/DHISMIDP/nbproject/project.properties 2009-04-10 16:30:05 +0000
+++ local/in/DHISMIDP/nbproject/project.properties 2009-04-18 10:48:13 +0000
@@ -25,11 +25,12 @@
deployment.method=NONE
deployment.override.jarurl=false
dist.dir=dist/${config.active}
-dist.jad=DHISMIDP.jad
-dist.jar=DHISMIDP.jar
+dist.jad=Mobile-SCDRT.jad
+dist.jar=Mobile-SCDRT.jar
dist.javadoc.dir=${dist.dir}/doc
dist.root.dir=dist
extra.classpath=
+file.reference.builtin.ks=${netbeans.user}/config/j2me/builtin.ks
filter.exclude.tests=false
filter.excludes=
filter.more.excludes=
@@ -38,7 +39,7 @@
javac.debug=true
javac.deprecation=false
javac.encoding=UTF-8
-javac.optimize=false
+javac.optimize=true
javac.source=1.3
javac.target=1.3
javadoc.author=false
@@ -58,8 +59,8 @@
manifest.file=manifest.mf
manifest.jad=
manifest.manifest=
-manifest.midlets=MIDlet-1: ANM Mobile Reporting,,org.hispindia.mobile.ANMApp\n
-manifest.others=MIDlet-Vendor: Vendor\nMIDlet-Name: DHISMIDP\nMIDlet-Version: 1.0\n
+manifest.midlets=MIDlet-1: Mobile SCDRT,,org.hispindia.mobile.ANMApp\n
+manifest.others=MIDlet-Vendor: Society for Health Information Systems Programme\nMIDlet-Name: Mobile SCDRT\nMIDlet-Version: 1.0\n
manifest.pushregistry=
name=DHISMIDP
no.dependencies=false
@@ -123,7 +124,7 @@
run.cmd.options=
run.jvmargs=
run.method=STANDARD
-run.security.domain=trusted
+run.security.domain=manufacturer
run.use.security.domain=false
savaje.application.icon=
savaje.application.icon.focused=
@@ -141,9 +142,9 @@
semc.certificate.path=
semc.private.key.password=
semc.private.key.path=
-sign.alias=
+sign.alias=minimal
sign.enabled=false
-sign.keystore=
+sign.keystore=${file.reference.builtin.ks}
src.dir=src
use.emptyapis=true
use.preprocessor=true
=== modified file 'local/in/DHISMIDP/src/org/hispindia/mobile/ANMApp.java'
--- local/in/DHISMIDP/src/org/hispindia/mobile/ANMApp.java 2009-04-10 16:30:05 +0000
+++ local/in/DHISMIDP/src/org/hispindia/mobile/ANMApp.java 2009-04-18 10:48:13 +0000
@@ -130,6 +130,7 @@
private TextField phone3Num;
private TextField phone1Num;
private TextField phone2Num;
+ private Alert exitAlert;
private Command ancCmd;
private Command deliveriesCmd;
private Command deliveriesBackCmd;
@@ -159,6 +160,8 @@
private Command monthSettingsCmd;
private Command settingsBackCmd;
private Command settingsCmd;
+ private Command exitAlertCmd;
+ private Command exitAlertBackCmd;
private Image nrhmlogo;
private Image question;
private Font font;
@@ -175,7 +178,6 @@
} else {
firstRun = false;
}
- //System.out.println("First Run: " + firstRun);
if (firstRun) {
for (int i = 0; i < 90; i++) {
@@ -572,74 +574,83 @@
// write pre-action user code here
switchDisplayable(null, getPregOutPage());//GEN-LINE:|7-commandAction|24|43-postAction
// write post-action user code here
- }//GEN-BEGIN:|7-commandAction|25|86-preAction
+ }//GEN-BEGIN:|7-commandAction|25|263-preAction
+ } else if (displayable == exitAlert) {
+ if (command == exitAlertBackCmd) {//GEN-END:|7-commandAction|25|263-preAction
+ // write pre-action user code here
+ switchDisplayable(null, getSendPage());//GEN-LINE:|7-commandAction|26|263-postAction
+ // write post-action user code here
+ } else if (command == exitAlertCmd) {//GEN-LINE:|7-commandAction|27|261-preAction
+ // write pre-action user code here
+ exitMIDlet();//GEN-LINE:|7-commandAction|28|261-postAction
+ // write post-action user code here
+ }//GEN-BEGIN:|7-commandAction|29|86-preAction
} else if (displayable == familyPage) {
- if (command == familyBackCmd) {//GEN-END:|7-commandAction|25|86-preAction
- // write pre-action user code here
- switchDisplayable(null, getPregOutPage());//GEN-LINE:|7-commandAction|26|86-postAction
- // write post-action user code here
- } else if (command == familyCmd) {//GEN-LINE:|7-commandAction|27|84-preAction
- // write pre-action user code here
- switchDisplayable(null, getChildImmPage1());//GEN-LINE:|7-commandAction|28|84-postAction
- // write post-action user code here
- }//GEN-BEGIN:|7-commandAction|29|160-preAction
+ if (command == familyBackCmd) {//GEN-END:|7-commandAction|29|86-preAction
+ // write pre-action user code here
+ switchDisplayable(null, getPregOutPage());//GEN-LINE:|7-commandAction|30|86-postAction
+ // write post-action user code here
+ } else if (command == familyCmd) {//GEN-LINE:|7-commandAction|31|84-preAction
+ // write pre-action user code here
+ switchDisplayable(null, getChildImmPage1());//GEN-LINE:|7-commandAction|32|84-postAction
+ // write post-action user code here
+ }//GEN-BEGIN:|7-commandAction|33|160-preAction
} else if (displayable == healthFacilityPage) {
- if (command == healthFacilityBackCmd) {//GEN-END:|7-commandAction|29|160-preAction
+ if (command == healthFacilityBackCmd) {//GEN-END:|7-commandAction|33|160-preAction
// write pre-action user code here
- switchDisplayable(null, getChildImmPage4());//GEN-LINE:|7-commandAction|30|160-postAction
+ switchDisplayable(null, getChildImmPage4());//GEN-LINE:|7-commandAction|34|160-postAction
// write post-action user code here
- } else if (command == healthFacilityCmd) {//GEN-LINE:|7-commandAction|31|158-preAction
+ } else if (command == healthFacilityCmd) {//GEN-LINE:|7-commandAction|35|158-preAction
// write pre-action user code here
getEmptyFields();
- switchDisplayable(null, getSendPage());//GEN-LINE:|7-commandAction|32|158-postAction
+ switchDisplayable(null, getSendPage());//GEN-LINE:|7-commandAction|36|158-postAction
// write post-action user code here
- }//GEN-BEGIN:|7-commandAction|33|226-preAction
+ }//GEN-BEGIN:|7-commandAction|37|226-preAction
} else if (displayable == loadPage) {
- if (command == loadCmd) {//GEN-END:|7-commandAction|33|226-preAction
+ if (command == loadCmd) {//GEN-END:|7-commandAction|37|226-preAction
int lastSelected = lastChoice.getSelectedIndex();
- //System.out.println("Selected choice = " + lastSelected);
if (lastSelected == 0) {
editingLastReport = true;
} else {
editingLastReport = false;
}
- switchDisplayable(null, getMonthPage());//GEN-LINE:|7-commandAction|34|226-postAction
+ switchDisplayable(null, getMonthPage());//GEN-LINE:|7-commandAction|38|226-postAction
// write post-action user code here
- } else if (command == loadExitCmd) {//GEN-LINE:|7-commandAction|35|228-preAction
+ } else if (command == loadExitCmd) {//GEN-LINE:|7-commandAction|39|228-preAction
// write pre-action user code here
- exitMIDlet();//GEN-LINE:|7-commandAction|36|228-postAction
+ exitMIDlet();//GEN-LINE:|7-commandAction|40|228-postAction
// write post-action user code here
- }//GEN-BEGIN:|7-commandAction|37|180-preAction
+ }//GEN-BEGIN:|7-commandAction|41|180-preAction
} else if (displayable == monthPage) {
- if (command == monthCmd) {//GEN-END:|7-commandAction|37|180-preAction
+ if (command == monthCmd) {//GEN-END:|7-commandAction|41|180-preAction
// write pre-action user code here
- switchDisplayable(null, getAncPage());//GEN-LINE:|7-commandAction|38|180-postAction
+ switchDisplayable(null, getAncPage());//GEN-LINE:|7-commandAction|42|180-postAction
// write post-action user code here
- } else if (command == monthExitCmd) {//GEN-LINE:|7-commandAction|39|188-preAction
+ } else if (command == monthExitCmd) {//GEN-LINE:|7-commandAction|43|188-preAction
- exitMIDlet();//GEN-LINE:|7-commandAction|40|188-postAction
+ exitMIDlet();//GEN-LINE:|7-commandAction|44|188-postAction
// write post-action user code here
- } else if (command == monthSettingsCmd) {//GEN-LINE:|7-commandAction|41|252-preAction
+ } else if (command == monthSettingsCmd) {//GEN-LINE:|7-commandAction|45|252-preAction
// write pre-action user code here
- switchDisplayable(null, getSettingsPage());//GEN-LINE:|7-commandAction|42|252-postAction
+ switchDisplayable(null, getSettingsPage());//GEN-LINE:|7-commandAction|46|252-postAction
// write post-action user code here
- }//GEN-BEGIN:|7-commandAction|43|64-preAction
+ }//GEN-BEGIN:|7-commandAction|47|64-preAction
} else if (displayable == pregOutPage) {
- if (command == pregOutBackCmd) {//GEN-END:|7-commandAction|43|64-preAction
- // write pre-action user code here
- switchDisplayable(null, getDeliveriesPage());//GEN-LINE:|7-commandAction|44|64-postAction
- // write post-action user code here
- } else if (command == pregOutCmd) {//GEN-LINE:|7-commandAction|45|62-preAction
- // write pre-action user code here
- switchDisplayable(null, getFamilyPage());//GEN-LINE:|7-commandAction|46|62-postAction
- // write post-action user code here
- }//GEN-BEGIN:|7-commandAction|47|171-preAction
+ if (command == pregOutBackCmd) {//GEN-END:|7-commandAction|47|64-preAction
+ // write pre-action user code here
+ switchDisplayable(null, getDeliveriesPage());//GEN-LINE:|7-commandAction|48|64-postAction
+ // write post-action user code here
+ } else if (command == pregOutCmd) {//GEN-LINE:|7-commandAction|49|62-preAction
+ // write pre-action user code here
+ switchDisplayable(null, getFamilyPage());//GEN-LINE:|7-commandAction|50|62-postAction
+ // write post-action user code here
+ }//GEN-BEGIN:|7-commandAction|51|171-preAction
} else if (displayable == sendPage) {
- if (command == sendBackCmd) {//GEN-END:|7-commandAction|47|171-preAction
+ if (command == sendBackCmd) {//GEN-END:|7-commandAction|51|171-preAction
// write pre-action user code here
- switchDisplayable(null, getHealthFacilityPage());//GEN-LINE:|7-commandAction|48|171-postAction
+ switchDisplayable(null, getHealthFacilityPage());//GEN-LINE:|7-commandAction|52|171-postAction
// write post-action user code here
- } else if (command == sendCmd) {//GEN-LINE:|7-commandAction|49|169-preAction
+ } else if (command == sendCmd) {//GEN-LINE:|7-commandAction|53|169-preAction
sendMsgLabel.setText("Sending SMS...");
final String monthData = String.valueOf(monthChoice.getSelectedIndex() + 1);
@@ -653,8 +664,6 @@
String childImm4FormData = vitA1Num.getString() + "|" + vitA5Num.getString() + "|" + vitA9Num.getString() + "|" + caseMeaslesNum.getString() + "|" + caseDiarrhNum.getString() + "|" + caseMalariaNum.getString();
String healthFacilityFormData = vhndNum.getString() + "|" + opdNum.getString() + "|" + hbTestsNum.getString() + "|" + anaemicOpdNum.getString() + "|";
- //System.out.println(monthData + "$" + ancFormData + "|" + deliveriesFormData + "|" + pregOutFormData + "|" + familyPlanFormData + "|" + childImm1FormData + "|" + childImm2FormData + "|" + childImm3FormData + "|" + childImm4FormData + "|" + healthFacilityFormData);
-
final String fullData = monthData + "$" + ancFormData + "|" + deliveriesFormData + "|" + pregOutFormData + "|" + familyPlanFormData + "|" + childImm1FormData + "|" + childImm2FormData + "|" + childImm3FormData + "|" + childImm4FormData + "|" +
healthFacilityFormData;
@@ -663,7 +672,6 @@
public void run() {
try {
- //System.out.println("Updating Records");
lastMsgStore.setRecord(10, monthData.getBytes(), 0, monthData.length());
//<editor-fold defaultstate="collapsed" desc=" ancForm to update RMS ">
@@ -770,7 +778,6 @@
lastMsgStore.setRecord(87, anaemicOpdNum.getString().getBytes(), 0, anaemicOpdNum.getString().length());
//</editor-fold>
- //System.out.println("Records Updated Successfully");
lastMsgStore.setRecord(4, "true".getBytes(), 0, "true".getBytes().length);
savedMsg = true;
@@ -795,17 +802,15 @@
MessageConnection smsConn = (MessageConnection) Connector.open("sms://+91" + new String(lastMsgStore.getRecord(i + 1)));
BinaryMessage sms = (BinaryMessage) smsConn.newMessage(MessageConnection.BINARY_MESSAGE);
byte[] compressedData = Compressor.compress(fullData.getBytes("UTF-8"));
- //String compressedText = new String(compressedData, "UTF-8");
- //System.out.println("Compressed Text: " + compressedText);
sms.setPayloadData(compressedData);
smsConn.send(sms);
smsConn.close();
}
}
if (j == 0) {
- sendMsgLabel.setText("No number to send SMS... Please go to settings and enter a phone number");
+ sendMsgLabel.setText("No Number to Send SMS... Please Go to Settings & Enter a Phone Number");
} else {
- sendMsgLabel.setText("Message Sent Successfully. You can go back and edit or exit the application now.");
+ sendMsgLabel.setText("Message Saved & Sent Successfully. You Can Go Back & Edit or Exit the Application");
}
} catch (UnsupportedEncodingException ex) {
ex.printStackTrace();
@@ -824,23 +829,23 @@
}).start();
//</editor-fold>
-//GEN-LINE:|7-commandAction|50|169-postAction
- // write post-action user code here
- } else if (command == sendExitCmd) {//GEN-LINE:|7-commandAction|51|207-preAction
- // write pre-action user code here
- exitMIDlet();//GEN-LINE:|7-commandAction|52|207-postAction
- // write post-action user code here
- } else if (command == sendSettingsCmd) {//GEN-LINE:|7-commandAction|53|255-preAction
- // write pre-action user code here
- switchDisplayable(null, getSettingsPage());//GEN-LINE:|7-commandAction|54|255-postAction
- // write post-action user code here
- }//GEN-BEGIN:|7-commandAction|55|246-preAction
+//GEN-LINE:|7-commandAction|54|169-postAction
+ // write post-action user code here
+ } else if (command == sendExitCmd) {//GEN-LINE:|7-commandAction|55|207-preAction
+ // write pre-action user code here
+ switchDisplayable(getExitAlert(), getSendPage());//GEN-LINE:|7-commandAction|56|207-postAction
+ // write post-action user code here
+ } else if (command == sendSettingsCmd) {//GEN-LINE:|7-commandAction|57|255-preAction
+ // write pre-action user code here
+ switchDisplayable(null, getSettingsPage());//GEN-LINE:|7-commandAction|58|255-postAction
+ // write post-action user code here
+ }//GEN-BEGIN:|7-commandAction|59|246-preAction
} else if (displayable == settingsPage) {
- if (command == settingsBackCmd) {//GEN-END:|7-commandAction|55|246-preAction
+ if (command == settingsBackCmd) {//GEN-END:|7-commandAction|59|246-preAction
// write pre-action user code here
- switchToPreviousDisplayable();//GEN-LINE:|7-commandAction|56|246-postAction
+ switchToPreviousDisplayable();//GEN-LINE:|7-commandAction|60|246-postAction
// write post-action user code here
- } else if (command == settingsCmd) {//GEN-LINE:|7-commandAction|57|243-preAction
+ } else if (command == settingsCmd) {//GEN-LINE:|7-commandAction|61|243-preAction
try {
String phone1 = phone1Num.getString();
String phone2 = phone2Num.getString();
@@ -856,21 +861,21 @@
} catch (RecordStoreException ex) {
ex.printStackTrace();
}
- switchToPreviousDisplayable();//GEN-LINE:|7-commandAction|58|243-postAction
+ switchToPreviousDisplayable();//GEN-LINE:|7-commandAction|62|243-postAction
// write post-action user code here
- }//GEN-BEGIN:|7-commandAction|59|203-preAction
+ }//GEN-BEGIN:|7-commandAction|63|203-preAction
} else if (displayable == splashScreen) {
- if (command == SplashScreen.DISMISS_COMMAND) {//GEN-END:|7-commandAction|59|203-preAction
+ if (command == SplashScreen.DISMISS_COMMAND) {//GEN-END:|7-commandAction|63|203-preAction
if (savedMsg == false) {
switchDisplayable(null, getMonthPage());
} else {
- switchDisplayable(null, getLoadPage());//GEN-LINE:|7-commandAction|60|203-postAction
+ switchDisplayable(null, getLoadPage());//GEN-LINE:|7-commandAction|64|203-postAction
}
- }//GEN-BEGIN:|7-commandAction|61|7-postCommandAction
- }//GEN-END:|7-commandAction|61|7-postCommandAction
+ }//GEN-BEGIN:|7-commandAction|65|7-postCommandAction
+ }//GEN-END:|7-commandAction|65|7-postCommandAction
// write post-action user code here
- }//GEN-BEGIN:|7-commandAction|62|
- //</editor-fold>//GEN-END:|7-commandAction|62|
+ }//GEN-BEGIN:|7-commandAction|66|
+ //</editor-fold>//GEN-END:|7-commandAction|66|
//<editor-fold defaultstate="collapsed" desc=" Generated Getter: deliveriesPage ">//GEN-BEGIN:|26-getter|0|26-preInit
/**
@@ -3232,7 +3237,6 @@
public void itemStateChanged(Item item) {
if (item == reportingChoice) {
- //System.out.println("Checking....");
if (reportingChoice.getSelectedIndex() == 0) {
monthPage.delete(1);
monthPage.append(monthChoice);
@@ -3559,7 +3563,7 @@
*/
public ChoiceGroup getReportingChoice() {
if (reportingChoice == null) {//GEN-END:|235-getter|0|235-preInit
- // write pre-init user code here
+ // write pre-init user code here
reportingChoice = new ChoiceGroup("Reporting Freq:", Choice.POPUP);//GEN-BEGIN:|235-getter|1|235-postInit
reportingChoice.append("Monthly", null);
reportingChoice.append("Weekly", null);
@@ -3581,9 +3585,9 @@
*/
public ImageItem getQuestionImage() {
if (questionImage == null) {//GEN-END:|241-getter|0|241-preInit
- // write pre-init user code here
+ // write pre-init user code here
questionImage = new ImageItem("", getQuestion(), ImageItem.LAYOUT_CENTER | Item.LAYOUT_2, "");//GEN-LINE:|241-getter|1|241-postInit
- // write post-init user code here
+ // write post-init user code here
}//GEN-BEGIN:|241-getter|2|
return questionImage;
}
@@ -3596,9 +3600,9 @@
*/
public Command getSettingsCmd() {
if (settingsCmd == null) {//GEN-END:|242-getter|0|242-preInit
- // write pre-init user code here
+ // write pre-init user code here
settingsCmd = new Command("Save", Command.OK, 0);//GEN-LINE:|242-getter|1|242-postInit
- // write post-init user code here
+ // write post-init user code here
}//GEN-BEGIN:|242-getter|2|
return settingsCmd;
}
@@ -3611,9 +3615,9 @@
*/
public Command getSettingsBackCmd() {
if (settingsBackCmd == null) {//GEN-END:|245-getter|0|245-preInit
- // write pre-init user code here
+ // write pre-init user code here
settingsBackCmd = new Command("Back", Command.BACK, 0);//GEN-LINE:|245-getter|1|245-postInit
- // write post-init user code here
+ // write post-init user code here
}//GEN-BEGIN:|245-getter|2|
return settingsBackCmd;
}
@@ -3626,17 +3630,17 @@
*/
public TextField getPhone1Num() {
if (phone1Num == null) {//GEN-END:|248-getter|0|248-preInit
- String str = "";
- try {
- if (lastMsgStore.getRecord(1) != null) {
- str = new String(lastMsgStore.getRecord(1));
- }
+ String str = "";
+ try {
+ if (lastMsgStore.getRecord(1) != null) {
+ str = new String(lastMsgStore.getRecord(1));
+ }
- } catch (RecordStoreException rsex) {
- rsex.printStackTrace();
- }
- phone1Num = new TextField("Enter Phone:", str, 32, TextField.PHONENUMBER);//GEN-LINE:|248-getter|1|248-postInit
- // write post-init user code here
+ } catch (RecordStoreException rsex) {
+ rsex.printStackTrace();
+ }
+ phone1Num = new TextField("Enter 10-digit Phone #1:", str, 10, TextField.PHONENUMBER);//GEN-LINE:|248-getter|1|248-postInit
+ // write post-init user code here
}//GEN-BEGIN:|248-getter|2|
return phone1Num;
}
@@ -3649,17 +3653,17 @@
*/
public TextField getPhone2Num() {
if (phone2Num == null) {//GEN-END:|249-getter|0|249-preInit
- String str = "";
- try {
- if (lastMsgStore.getRecord(2) != null) {
- str = new String(lastMsgStore.getRecord(2));
- }
+ String str = "";
+ try {
+ if (lastMsgStore.getRecord(2) != null) {
+ str = new String(lastMsgStore.getRecord(2));
+ }
- } catch (RecordStoreException rsex) {
- rsex.printStackTrace();
- }
- phone2Num = new TextField("Enter Phone #2:", str, 32, TextField.PHONENUMBER);//GEN-LINE:|249-getter|1|249-postInit
- // write post-init user code here
+ } catch (RecordStoreException rsex) {
+ rsex.printStackTrace();
+ }
+ phone2Num = new TextField("Enter 10-digit Phone #2:", str, 10, TextField.PHONENUMBER);//GEN-LINE:|249-getter|1|249-postInit
+ // write post-init user code here
}//GEN-BEGIN:|249-getter|2|
return phone2Num;
}
@@ -3681,7 +3685,7 @@
} catch (RecordStoreException rsex) {
rsex.printStackTrace();
}
- phone3Num = new TextField("Enter Phone #3:", str, 32, TextField.PHONENUMBER);//GEN-LINE:|250-getter|1|250-postInit
+ phone3Num = new TextField("Enter 10-digit Phone #3:", str, 10, TextField.PHONENUMBER);//GEN-LINE:|250-getter|1|250-postInit
// write post-init user code here
}//GEN-BEGIN:|250-getter|2|
return phone3Num;
@@ -3703,35 +3707,89 @@
}
//</editor-fold>//GEN-END:|251-getter|2|
- //<editor-fold defaultstate="collapsed" desc=" Generated Getter: sendSettingsCmd ">//GEN-BEGIN:|254-getter|0|254-preInit
- /**
- * Returns an initiliazed instance of sendSettingsCmd component.
- * @return the initialized component instance
- */
- public Command getSendSettingsCmd() {
- if (sendSettingsCmd == null) {//GEN-END:|254-getter|0|254-preInit
- // write pre-init user code here
- sendSettingsCmd = new Command("Settings", Command.OK, 0);//GEN-LINE:|254-getter|1|254-postInit
- // write post-init user code here
- }//GEN-BEGIN:|254-getter|2|
- return sendSettingsCmd;
- }
- //</editor-fold>//GEN-END:|254-getter|2|
-
- //<editor-fold defaultstate="collapsed" desc=" Generated Getter: dateField ">//GEN-BEGIN:|258-getter|0|258-preInit
- /**
- * Returns an initiliazed instance of dateField component.
- * @return the initialized component instance
- */
- public TextField getDateField() {
- if (dateField == null) {//GEN-END:|258-getter|0|258-preInit
- // write pre-init user code here
- dateField = new TextField("Enter Date (yyyy-mm-dd):", null, 32, TextField.ANY);//GEN-LINE:|258-getter|1|258-postInit
- // write post-init user code here
- }//GEN-BEGIN:|258-getter|2|
- return dateField;
- }
- //</editor-fold>//GEN-END:|258-getter|2|
+ //<editor-fold defaultstate="collapsed" desc=" Generated Getter: sendSettingsCmd ">//GEN-BEGIN:|254-getter|0|254-preInit
+ /**
+ * Returns an initiliazed instance of sendSettingsCmd component.
+ * @return the initialized component instance
+ */
+ public Command getSendSettingsCmd() {
+ if (sendSettingsCmd == null) {//GEN-END:|254-getter|0|254-preInit
+ // write pre-init user code here
+ sendSettingsCmd = new Command("Settings", Command.OK, 0);//GEN-LINE:|254-getter|1|254-postInit
+ // write post-init user code here
+ }//GEN-BEGIN:|254-getter|2|
+ return sendSettingsCmd;
+ }
+ //</editor-fold>//GEN-END:|254-getter|2|
+
+ //<editor-fold defaultstate="collapsed" desc=" Generated Getter: dateField ">//GEN-BEGIN:|258-getter|0|258-preInit
+ /**
+ * Returns an initiliazed instance of dateField component.
+ * @return the initialized component instance
+ */
+ public TextField getDateField() {
+ if (dateField == null) {//GEN-END:|258-getter|0|258-preInit
+ // write pre-init user code here
+ dateField = new TextField("Enter Date (yyyy-mm-dd):", null, 32, TextField.ANY);//GEN-LINE:|258-getter|1|258-postInit
+ // write post-init user code here
+ }//GEN-BEGIN:|258-getter|2|
+ return dateField;
+ }
+ //</editor-fold>//GEN-END:|258-getter|2|
+ //</editor-fold>
+
+ //<editor-fold defaultstate="collapsed" desc=" Generated Getter: exitAlert ">//GEN-BEGIN:|259-getter|0|259-preInit
+ /**
+ * Returns an initiliazed instance of exitAlert component.
+ * @return the initialized component instance
+ */
+ public Alert getExitAlert() {
+ if (exitAlert == null) {//GEN-END:|259-getter|0|259-preInit
+ // write pre-init user code here
+ exitAlert = new Alert("Exit Warning", "Are you sure you want to exit?\n\nAny unsent data will be lost!", null, AlertType.CONFIRMATION);//GEN-BEGIN:|259-getter|1|259-postInit
+ exitAlert.addCommand(getExitAlertCmd());
+ exitAlert.addCommand(getExitAlertBackCmd());
+ exitAlert.setCommandListener(this);
+ exitAlert.setTimeout(Alert.FOREVER);//GEN-END:|259-getter|1|259-postInit
+ // write post-init user code here
+ }//GEN-BEGIN:|259-getter|2|
+ return exitAlert;
+ }
+ //</editor-fold>//GEN-END:|259-getter|2|
+ //</editor-fold>
+
+ //<editor-fold defaultstate="collapsed" desc=" Generated Getter: exitAlertCmd ">//GEN-BEGIN:|260-getter|0|260-preInit
+ /**
+ * Returns an initiliazed instance of exitAlertCmd component.
+ * @return the initialized component instance
+ */
+ public Command getExitAlertCmd() {
+ if (exitAlertCmd == null) {//GEN-END:|260-getter|0|260-preInit
+ // write pre-init user code here
+ exitAlertCmd = new Command("Yes", Command.EXIT, 0);//GEN-LINE:|260-getter|1|260-postInit
+ // write post-init user code here
+ }//GEN-BEGIN:|260-getter|2|
+ return exitAlertCmd;
+ }
+ //</editor-fold>//GEN-END:|260-getter|2|
+ //</editor-fold>
+
+ //<editor-fold defaultstate="collapsed" desc=" Generated Getter: exitAlertBackCmd ">//GEN-BEGIN:|262-getter|0|262-preInit
+ /**
+ * Returns an initiliazed instance of exitAlertBackCmd component.
+ * @return the initialized component instance
+ */
+ public Command getExitAlertBackCmd() {
+ if (exitAlertBackCmd == null) {//GEN-END:|262-getter|0|262-preInit
+ // write pre-init user code here
+ exitAlertBackCmd = new Command("No", Command.BACK, 0);//GEN-LINE:|262-getter|1|262-postInit
+ // write post-init user code here
+ }//GEN-BEGIN:|262-getter|2|
+ return exitAlertBackCmd;
+ }
+ //</editor-fold>//GEN-END:|262-getter|2|
+
+
private void getEmptyFields() {
String ancFormData = pregNum.getString() + "|" + firstTrimesterNum.getString() + "|" + jsyNum.getString() + "|" + threeAncNum.getString() + "|" + tt1Num.getString() + "|" + boosterNum.getString() + "|" + ifaTabletNum.getString() + "|" + hypertensionNum.getString() + "|" + anaemicAncNum.getString();
@@ -3753,7 +3811,6 @@
j++;
}
}
- //System.out.println("Total Blank Fields = " + j);
try {
if (j != 0) {
Image missingImg = Image.createImage("/org/hispindia/mobile/images/exclamation.png");
@@ -3785,7 +3842,7 @@
// Get the last node
nodes.addElement(original);
- // Create splitted string array
+ // Create a split string array
String[] result = new String[nodes.size()];
if (nodes.size() > 0) {
for (int loop = 0; loop < nodes.size(); loop++) {
=== modified file 'local/in/DHISMIDP/src/org/hispindia/mobile/ANMApp.vmd'
--- local/in/DHISMIDP/src/org/hispindia/mobile/ANMApp.vmd 2009-04-10 16:30:05 +0000
+++ local/in/DHISMIDP/src/org/hispindia/mobile/ANMApp.vmd 2009-04-18 10:48:13 +0000
@@ -946,12 +946,13 @@
<Property name="command" typeID="Cjavax.microedition.lcdui.Command" value="R168"/>
</Component>
<Component componentID="207" typeID="C#CommandEventSource">
- <Property name="eventHandler" typeID="C#EventHandler" value="R208"/>
+ <Property name="eventHandler" typeID="C#EventHandler" value="R267"/>
<Property name="displayable" typeID="Cjavax.microedition.lcdui.Displayable" value="R167"/>
<Property name="command" typeID="Cjavax.microedition.lcdui.Command" value="R206"/>
- <Component componentID="208" typeID="C#ExitMidletEventHandler">
+ <Component componentID="267" typeID="C#SwitchDisplayableEventHandler">
<Property name="eventSource" typeID="C#EventSource" value="R207"/>
- <Property name="mobileDevice" typeID="C#MobileDevice" value="R2"/>
+ <Property name="displayable" typeID="Cjavax.microedition.lcdui.Displayable" value="R167"/>
+ <Property name="alert" typeID="Cjavax.microedition.lcdui.Alert" value="R259"/>
</Component>
</Component>
<Component componentID="210" typeID="Cjavax.microedition.lcdui.StringItem">
@@ -1120,10 +1121,10 @@
</Component>
</Component>
<Component componentID="228" typeID="C#CommandEventSource">
- <Property name="eventHandler" typeID="C#EventHandler" value="R229"/>
+ <Property name="eventHandler" typeID="C#EventHandler" value="R270"/>
<Property name="displayable" typeID="Cjavax.microedition.lcdui.Displayable" value="R219"/>
<Property name="command" typeID="Cjavax.microedition.lcdui.Command" value="R227"/>
- <Component componentID="229" typeID="C#ExitMidletEventHandler">
+ <Component componentID="270" typeID="C#ExitMidletEventHandler">
<Property name="eventSource" typeID="C#EventSource" value="R228"/>
<Property name="mobileDevice" typeID="C#MobileDevice" value="R2"/>
</Component>
@@ -1154,26 +1155,26 @@
<Property name="items" typeID="1Cjavax.microedition.lcdui.Item" value="A3:4_R2484_R2494_R250"/>
<Component componentID="250" typeID="Cjavax.microedition.lcdui.TextField">
<Property name="instanceName" typeID="Pjava.lang.String" value="Vphone3Num"/>
- <Property name="label" typeID="Pjava.lang.String" value="VEnter Phone #3:"/>
+ <Property name="label" typeID="Pjava.lang.String" value="VEnter 10-digit Phone #3:"/>
<Property name="itemCommandListener" typeID="C#ItemCommandListener" value="R8"/>
<Property name="text" typeID="Pjava.lang.String" value="Ustr"/>
- <Property name="maxSize" typeID="Pint" value="V32"/>
+ <Property name="maxSize" typeID="Pint" value="V10"/>
<Property name="constraints" typeID="Pint" value="V3"/>
</Component>
<Component componentID="248" typeID="Cjavax.microedition.lcdui.TextField">
<Property name="instanceName" typeID="Pjava.lang.String" value="Vphone1Num"/>
- <Property name="label" typeID="Pjava.lang.String" value="VEnter Phone:"/>
+ <Property name="label" typeID="Pjava.lang.String" value="VEnter 10-digit Phone #1:"/>
<Property name="itemCommandListener" typeID="C#ItemCommandListener" value="R8"/>
<Property name="text" typeID="Pjava.lang.String" value="Ustr"/>
- <Property name="maxSize" typeID="Pint" value="V32"/>
+ <Property name="maxSize" typeID="Pint" value="V10"/>
<Property name="constraints" typeID="Pint" value="V3"/>
</Component>
<Component componentID="249" typeID="Cjavax.microedition.lcdui.TextField">
<Property name="instanceName" typeID="Pjava.lang.String" value="Vphone2Num"/>
- <Property name="label" typeID="Pjava.lang.String" value="VEnter Phone #2:"/>
+ <Property name="label" typeID="Pjava.lang.String" value="VEnter 10-digit Phone #2:"/>
<Property name="itemCommandListener" typeID="C#ItemCommandListener" value="R8"/>
<Property name="text" typeID="Pjava.lang.String" value="Ustr"/>
- <Property name="maxSize" typeID="Pint" value="V32"/>
+ <Property name="maxSize" typeID="Pint" value="V10"/>
<Property name="constraints" typeID="Pint" value="V3"/>
</Component>
<Component componentID="246" typeID="C#CommandEventSource">
@@ -1193,6 +1194,33 @@
</Component>
</Component>
</Component>
+ <Component componentID="259" typeID="Cjavax.microedition.lcdui.Alert">
+ <Property name="instanceName" typeID="Pjava.lang.String" value="VexitAlert"/>
+ <Property name="commands" typeID="1C#CommandEventSource" value="A2:4_R2614_R263"/>
+ <Property name="title" typeID="Pjava.lang.String" value="VExit Warning"/>
+ <Property name="commandListener" typeID="C#CommandListener" value="R7"/>
+ <Property name="string" typeID="Pjava.lang.String" value="VAre you sure you want to exit? Any unsent data will be lost!"/>
+ <Property name="timeout" typeID="Pint" value="V-2"/>
+ <Property name="type" typeID="Ejavax.microedition.lcdui.AlertType" value="ECONFIRMATION"/>
+ <Component componentID="261" typeID="C#CommandEventSource">
+ <Property name="eventHandler" typeID="C#EventHandler" value="R264"/>
+ <Property name="displayable" typeID="Cjavax.microedition.lcdui.Displayable" value="R259"/>
+ <Property name="command" typeID="Cjavax.microedition.lcdui.Command" value="R260"/>
+ <Component componentID="264" typeID="C#ExitMidletEventHandler">
+ <Property name="eventSource" typeID="C#EventSource" value="R261"/>
+ <Property name="mobileDevice" typeID="C#MobileDevice" value="R2"/>
+ </Component>
+ </Component>
+ <Component componentID="263" typeID="C#CommandEventSource">
+ <Property name="eventHandler" typeID="C#EventHandler" value="R268"/>
+ <Property name="displayable" typeID="Cjavax.microedition.lcdui.Displayable" value="R259"/>
+ <Property name="command" typeID="Cjavax.microedition.lcdui.Command" value="R262"/>
+ <Component componentID="268" typeID="C#SwitchDisplayableEventHandler">
+ <Property name="eventSource" typeID="C#EventSource" value="R263"/>
+ <Property name="displayable" typeID="Cjavax.microedition.lcdui.Displayable" value="R167"/>
+ </Component>
+ </Component>
+ </Component>
</Component>
<Component componentID="11" typeID="C#CommandsCategory">
<Component componentID="27" typeID="Cjavax.microedition.lcdui.Command">
@@ -1346,6 +1374,16 @@
<Property name="label" typeID="Pjava.lang.String" value="VSave"/>
<Property name="type" typeID="Pint" value="V4"/>
</Component>
+ <Component componentID="260" typeID="Cjavax.microedition.lcdui.Command">
+ <Property name="instanceName" typeID="Pjava.lang.String" value="VexitAlertCmd"/>
+ <Property name="label" typeID="Pjava.lang.String" value="VYes"/>
+ <Property name="type" typeID="Pint" value="V7"/>
+ </Component>
+ <Component componentID="262" typeID="Cjavax.microedition.lcdui.Command">
+ <Property name="instanceName" typeID="Pjava.lang.String" value="VexitAlertBackCmd"/>
+ <Property name="label" typeID="Pjava.lang.String" value="VNo"/>
+ <Property name="type" typeID="Pint" value="V2"/>
+ </Component>
</Component>
<Component componentID="12" typeID="C#ResourcesCategory">
<Component componentID="205" typeID="Cjavax.microedition.lcdui.Image">
@@ -1368,20 +1406,21 @@
</Component>
</Document>
<FlowScene version="1">
- <Node componentID="202" descriptorID="componentNode202" x="202" y="36"/>
- <Node componentID="142" descriptorID="componentNode142" x="625" y="222"/>
- <Node componentID="219" descriptorID="componentNode219" x="7" y="147"/>
- <Node componentID="66" descriptorID="componentNode66" x="338" y="326"/>
- <Node componentID="233" descriptorID="componentNode233" x="176" y="162"/>
+ <Node componentID="2" descriptorID="componentNode2" x="-10" y="17"/>
+ <Node componentID="127" descriptorID="componentNode127" x="628" y="74"/>
<Node componentID="110" descriptorID="componentNode110" x="354" y="109"/>
- <Node componentID="2" descriptorID="componentNode2" x="-10" y="17"/>
<Node componentID="44" descriptorID="componentNode44" x="390" y="460"/>
- <Node componentID="88" descriptorID="componentNode88" x="342" y="221"/>
+ <Node componentID="156" descriptorID="componentNode156" x="634" y="345"/>
+ <Node componentID="202" descriptorID="componentNode202" x="200" y="21"/>
+ <Node componentID="66" descriptorID="componentNode66" x="335" y="347"/>
+ <Node componentID="219" descriptorID="componentNode219" x="7" y="147"/>
+ <Node componentID="88" descriptorID="componentNode88" x="351" y="241"/>
+ <Node componentID="14" descriptorID="componentNode14" x="-1" y="397"/>
+ <Node componentID="259" descriptorID="componentNode259" x="181" y="103"/>
+ <Node componentID="142" descriptorID="componentNode142" x="625" y="222"/>
+ <Node componentID="167" descriptorID="componentNode167" x="661" y="476"/>
<Node componentID="26" descriptorID="componentNode26" x="-15" y="508"/>
- <Node componentID="167" descriptorID="componentNode167" x="661" y="476"/>
- <Node componentID="127" descriptorID="componentNode127" x="628" y="74"/>
+ <Node componentID="233" descriptorID="componentNode233" x="160" y="248"/>
<Node componentID="178" descriptorID="componentNode178" x="-10" y="283"/>
- <Node componentID="156" descriptorID="componentNode156" x="634" y="345"/>
- <Node componentID="14" descriptorID="componentNode14" x="-1" y="397"/>
</FlowScene>
</VisualDesign>
=== modified file 'local/in/SMSListener/nbproject/build-impl.xml'
--- local/in/SMSListener/nbproject/build-impl.xml 2009-04-10 16:30:05 +0000
+++ local/in/SMSListener/nbproject/build-impl.xml 2009-04-18 10:48:13 +0000
@@ -20,6 +20,13 @@
-->
<project xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:jaxrpc="http://www.netbeans.org/ns/j2se-project/jax-rpc" basedir=".." default="default" name="SMSListener-impl">
+ <fail message="Please build using Ant 1.7.1 or higher.">
+ <condition>
+ <not>
+ <antversion atleast="1.7.1"/>
+ </not>
+ </condition>
+ </fail>
<target depends="test,jar,javadoc" description="Build and test whole project." name="default"/>
<!--
======================
@@ -277,6 +284,8 @@
<java classname="@{classname}" dir="${work.dir}" fork="true">
<jvmarg line="${debug-args-line}"/>
<jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
+ <jvmarg value="-Dfile.encoding=${source.encoding}"/>
+ <redirector errorencoding="${source.encoding}" inputencoding="${source.encoding}" outputencoding="${source.encoding}"/>
<jvmarg line="${run.jvmargs}"/>
<classpath>
<path path="@{classpath}"/>
@@ -297,6 +306,8 @@
<element name="customize" optional="true"/>
<sequential>
<java classname="@{classname}" dir="${work.dir}" fork="true">
+ <jvmarg value="-Dfile.encoding=${source.encoding}"/>
+ <redirector errorencoding="${source.encoding}" inputencoding="${source.encoding}" outputencoding="${source.encoding}"/>
<jvmarg line="${run.jvmargs}"/>
<classpath>
<path path="@{classpath}"/>
=== modified file 'local/in/SMSListener/nbproject/genfiles.properties'
--- local/in/SMSListener/nbproject/genfiles.properties 2009-04-10 16:30:05 +0000
+++ local/in/SMSListener/nbproject/genfiles.properties 2009-04-18 10:48:13 +0000
@@ -4,5 +4,5 @@
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
nbproject/build-impl.xml.data.CRC32=b6bcf032
-nbproject/build-impl.xml.script.CRC32=833104a7
-nbproject/build-impl.xml.stylesheet.CRC32=d5ddc080@1.23.0.45
+nbproject/build-impl.xml.script.CRC32=d1cc7e71
+nbproject/build-impl.xml.stylesheet.CRC32=ce896a9e@1.25.0.45
--
Trunk
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.