dhis-mobile-devs team mailing list archive
-
dhis-mobile-devs team
-
Mailing list archive
-
Message #00378
[Branch ~dhis-mobile-devs/dhis-mobile/lwuit-tracking] Rev 206: add menu item and program list for single event without registration
------------------------------------------------------------
revno: 206
committer: Long <long.hispvietnam@xxxxxxxxx>
branch nick: lwuit-tracking
timestamp: Mon 2014-04-21 16:49:10 +0700
message:
add menu item and program list for single event without registration
modified:
build.xml
src/org/hisp/dhis/mobile/connection/task/PersonRegistrationTask.java
src/org/hisp/dhis/mobile/view/PersonRegistrationView.java
src/org/hisp/dhis/mobile/view/TrackingMainMenuView.java
--
lp:~dhis-mobile-devs/dhis-mobile/lwuit-tracking
https://code.launchpad.net/~dhis-mobile-devs/dhis-mobile/lwuit-tracking
Your team DHIS mobile developers is subscribed to branch lp:~dhis-mobile-devs/dhis-mobile/lwuit-tracking.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis-mobile-devs/dhis-mobile/lwuit-tracking/+edit-subscription
=== modified file 'build.xml'
--- build.xml 2014-04-03 09:53:18 +0000
+++ build.xml 2014-04-21 09:49:10 +0000
@@ -34,7 +34,7 @@
<!-- Which logo to use -->
<property name="logo" value="dhis2_logo.png" />
<!-- Server URL -->
- <property name="server.url" value="http://apps.dhis2.org/dev" />
+ <property name="server.url" value="http://localhost:8080/dhis" />
<!-- User Name -->
<property name="username" value="mobile" />
<!-- Password -->
=== modified file 'src/org/hisp/dhis/mobile/connection/task/PersonRegistrationTask.java'
--- src/org/hisp/dhis/mobile/connection/task/PersonRegistrationTask.java 2014-04-03 01:58:41 +0000
+++ src/org/hisp/dhis/mobile/connection/task/PersonRegistrationTask.java 2014-04-21 09:49:10 +0000
@@ -34,6 +34,7 @@
try
{
+ System.out.println("Try to connect");
DataInputStream inputStream = this.download( SerializationUtil.serialize( this.patient ), enrollProgramId,
"programid" );
=== modified file 'src/org/hisp/dhis/mobile/view/PersonRegistrationView.java'
--- src/org/hisp/dhis/mobile/view/PersonRegistrationView.java 2014-04-03 01:58:41 +0000
+++ src/org/hisp/dhis/mobile/view/PersonRegistrationView.java 2014-04-21 09:49:10 +0000
@@ -102,7 +102,6 @@
try
{
patientAttributeVector = program.getProgramAttributes();
-
for ( int i = 0; i < patientAttributeVector.size(); i++ )
{
PatientAttribute patientAttribute = (PatientAttribute) patientAttributeVector.elementAt( i );
@@ -126,9 +125,7 @@
mainForm.addComponent( comboBox );
patientAttributeValueVector.addElement( comboBox );
- }
- if ( patientAttribute.getType().equals( "combo" ) )
- {
+ } else if ( patientAttribute.getType().equals( "combo" ) ) {
LogMan.log( LogMan.DEBUG, "UI," + CLASS_TAG, "adding combo box" );
Vector optionSet = patientAttribute.getOptionSet().getOptions();
=== modified file 'src/org/hisp/dhis/mobile/view/TrackingMainMenuView.java'
--- src/org/hisp/dhis/mobile/view/TrackingMainMenuView.java 2014-04-03 01:58:41 +0000
+++ src/org/hisp/dhis/mobile/view/TrackingMainMenuView.java 2014-04-21 09:49:10 +0000
@@ -46,6 +46,7 @@
implements ActionListener
{
private static final String CLASS_TAG = "TrackingMainMenuView";
+
private List menuList;
private Form menuForm;
@@ -153,6 +154,21 @@
nameBasedMidlet.getWaitingView().showView();
nameBasedMidlet.getOfflineOrgUnitSelectView().showView();
}
+ else if ( nextPageName.equals( "Single Event Without Registration" ) )
+ {
+ if ( sizeOfOrgUnits > 1 )
+ {
+ nameBasedMidlet.getWaitingView().showView();
+ nameBasedMidlet.getOrgUnitSelectView().setProgramType( "1" );
+ nameBasedMidlet.getOrgUnitSelectView().setLostToFollowUp( false );
+ nameBasedMidlet.getOrgUnitSelectView().showView();
+ }
+ else
+ {
+ nameBasedMidlet.getProgramSelectView().setPrograms( ProgramRecordStore.getProgramByType( 3 ) );
+ nameBasedMidlet.getProgramSelectView().showView();
+ }
+ }
}
catch ( Exception e )
@@ -164,9 +180,7 @@
public List getMenuList()
{
- // String[] menuItems = { "Find Person", "Add Person",
- // "Lost to Follow Up", "History", "Pending Registration" };
- String[] menuItems = { "Find Person", "Add Person", "History", "Pending Registration" };
+ String[] menuItems = { "Find Person", "Add Person", "History", "Pending Registration", "Single Event Without Registration" };
if ( menuList == null )
{