← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 1736: mobile-web: import smslistener xml files... in progress

 

------------------------------------------------------------
revno: 1736
committer: Saptarshi <sunbiz@xxxxxxxxx>
branch nick: trunk
timestamp: Tue 2010-04-06 01:39:09 +0200
message:
  mobile-web: import smslistener xml files... in progress
removed:
  dhis-mobile/dhis-web-mobile/src/main/webapp/dhis-web-mobile/createMobileApp.vm
added:
  dhis-mobile/dhis-web-mobile/src/main/java/org/hisp/dhis/mobile/action/ReceiveImportPageAction.java
  dhis-mobile/dhis-web-mobile/src/main/java/org/hisp/dhis/mobileimport/action/XMLCreator.java
  dhis-mobile/dhis-web-mobile/src/main/webapp/dhis-web-mobile/createMobileAppPage.vm
  dhis-mobile/dhis-web-mobile/src/main/webapp/dhis-web-mobile/css/receiveImportPage.css
  dhis-mobile/dhis-web-mobile/src/main/webapp/dhis-web-mobile/receiveImportPage.vm
modified:
  dhis-mobile/dhis-web-mobile/src/main/java/org/hisp/dhis/mobile/action/MobileHomePageAction.java
  dhis-mobile/dhis-web-mobile/src/main/resources/META-INF/dhis/beans.xml
  dhis-mobile/dhis-web-mobile/src/main/resources/struts.xml
  dhis-mobile/dhis-web-mobile/src/main/webapp/dhis-web-mobile/create.html
  dhis-mobile/dhis-web-mobile/src/main/webapp/dhis-web-mobile/menu.vm
  dhis-mobile/dhis-web-mobile/src/main/webapp/dhis-web-mobile/sendSMSPage.vm


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-mobile/dhis-web-mobile/src/main/java/org/hisp/dhis/mobile/action/MobileHomePageAction.java'
--- dhis-mobile/dhis-web-mobile/src/main/java/org/hisp/dhis/mobile/action/MobileHomePageAction.java	2009-12-11 10:30:31 +0000
+++ dhis-mobile/dhis-web-mobile/src/main/java/org/hisp/dhis/mobile/action/MobileHomePageAction.java	2010-04-05 23:39:09 +0000
@@ -28,13 +28,35 @@
  */
 
 import com.opensymphony.xwork2.Action;
+import java.io.File;
 
 public class MobileHomePageAction implements Action
 {
+
     @Override
     public String execute()
         throws Exception
     {
+        File miFolder = new File( System.getenv( "DHIS2_HOME" ), "mi" );
+        if ( !( miFolder.exists() && miFolder.isDirectory() ) )
+        {
+            miFolder.mkdir();
+        }
+        File pendingFolder = new File( miFolder, "pending" );
+        if ( !( pendingFolder.exists() && pendingFolder.isDirectory() ) )
+        {
+            pendingFolder.mkdir();
+        }
+        File bouncedFolder = new File( miFolder, "bounced" );
+        if ( !( bouncedFolder.exists() && bouncedFolder.isDirectory() ) )
+        {
+            bouncedFolder.mkdir();
+        }
+        File completedFolder = new File( miFolder, "completed" );
+        if ( !( completedFolder.exists() && completedFolder.isDirectory() ) )
+        {
+            completedFolder.mkdir();
+        }
         return SUCCESS;
     }
 }

=== added file 'dhis-mobile/dhis-web-mobile/src/main/java/org/hisp/dhis/mobile/action/ReceiveImportPageAction.java'
--- dhis-mobile/dhis-web-mobile/src/main/java/org/hisp/dhis/mobile/action/ReceiveImportPageAction.java	1970-01-01 00:00:00 +0000
+++ dhis-mobile/dhis-web-mobile/src/main/java/org/hisp/dhis/mobile/action/ReceiveImportPageAction.java	2010-04-05 23:39:09 +0000
@@ -0,0 +1,115 @@
+package org.hisp.dhis.mobile.action;
+
+/*
+ * Copyright (c) 2004-2007, University of Oslo
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this
+ *   list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ *   this list of conditions and the following disclaimer in the documentation
+ *   and/or other materials provided with the distribution.
+ * * Neither the name of the HISP project nor the names of its contributors may
+ *   be used to endorse or promote products derived from this software without
+ *   specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+import com.opensymphony.xwork2.Action;
+import java.io.File;
+import java.util.List;
+import org.apache.commons.io.FileUtils;
+import org.hisp.dhis.mobile.SmsService;
+
+public class ReceiveImportPageAction implements Action
+{
+    // -------------------------------------------------------------------------
+    // Dependencies
+    // -------------------------------------------------------------------------
+
+    SmsService smsService;
+
+    public void setSmsService( SmsService smsService )
+    {
+        this.smsService = smsService;
+    }
+
+    // -------------------------------------------------------------------------
+    // Action Implementation
+    // -------------------------------------------------------------------------
+    boolean smsServiceStatus;
+
+    public boolean getSmsServiceStatus()
+    {
+        smsServiceStatus = smsService.getServiceStatus();
+        return smsServiceStatus;
+    }
+
+    String statAction;
+
+    public void setStatAction( String statAction )
+    {
+        if ( statAction.equalsIgnoreCase( "Start" ) )
+        {
+            smsService.startService();
+        } else
+        {
+            smsService.stopService();
+        }
+    }
+
+    private List<File> pending;
+
+    public List<File> getPending()
+    {
+        File pendingFolder = new File( System.getenv( "DHIS2_HOME" ), "mi/pending" );
+        pending = (List<File>) FileUtils.listFiles( pendingFolder, new String[]
+            {
+                "xml"
+            }, false );
+        return pending;
+    }
+
+    private List<File> bounced;
+
+    public List<File> getBounced()
+    {
+        File bouncedFolder = new File( System.getenv( "DHIS2_HOME" ), "mi/bounced" );
+        bounced = (List<File>) FileUtils.listFiles( bouncedFolder, new String[]
+            {
+                "xml"
+            }, false );
+        return bounced;
+    }
+
+    private List<File> completed;
+
+    public List<File> getCompleted()
+    {
+        File completedFolder = new File( System.getenv( "DHIS2_HOME" ), "mi/completed" );
+        completed = (List<File>) FileUtils.listFiles( completedFolder, new String[]
+            {
+                "xml"
+            }, false );
+        return completed;
+    }
+
+    @Override
+    public String execute()
+        throws Exception
+    {
+        return SUCCESS;
+    }
+}

=== added file 'dhis-mobile/dhis-web-mobile/src/main/java/org/hisp/dhis/mobileimport/action/XMLCreator.java'
--- dhis-mobile/dhis-web-mobile/src/main/java/org/hisp/dhis/mobileimport/action/XMLCreator.java	1970-01-01 00:00:00 +0000
+++ dhis-mobile/dhis-web-mobile/src/main/java/org/hisp/dhis/mobileimport/action/XMLCreator.java	2010-04-05 23:39:09 +0000
@@ -0,0 +1,111 @@
+/*
+ * Copyright (c) 2004-2007, University of Oslo
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this
+ *   list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ *   this list of conditions and the following disclaimer in the documentation
+ *   and/or other materials provided with the distribution.
+ * * Neither the name of the HISP project nor the names of its contributors may
+ *   be used to endorse or promote products derived from this software without
+ *   specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+package org.hisp.dhis.mobileimport.action;
+
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+
+public class XMLCreator
+{
+
+    public void writeXML( String phoneNumber, String sendTime, String info )
+    {
+        String dhis2Home = System.getenv( "DHIS2_HOME" );
+        String[] elementIds =
+        {
+            "3.1", "4.1", "5.1", "6.1", "7.1", "8.1", "9.1", "10.1", "12.1", "14.1", "15.1", "17.1", "16.1", "1251.1", "19.1", "20.1", "21.1", "25.1", "24.1", "23.1", "32.1", "33.1", "515.1", "517.1", "521.1", "40.1", "41.1", "1279.1", "59.1", "60.1", "61.1", "62.1", "63.1", "64.1", "65.1", "66.1", "67.1", "1139.7", "1139.8", "68.1", "71.1", "74.1", "77.1", "69.1", "70.1", "73.1", "76.1", "72.1", "75.1", "78.1", "79.1", "80.1", "81.1", "83.1", "82.1", "84.1", "85.1", "86.1", "87.1", "88.1", "89.1", "90.1", "1247.7", "91.1", "92.1", "93.1", "94.1", "96.1", "97.1", "98.1", "104.1", "105.1", "106.1", "162.1", "130.1", "134.1", "135.1"
+        };
+
+        String[] formData = info.split( "\\$" );
+        String period = formData[0];
+        String actualData = formData[1];
+        String[] dataValues = actualData.split( "\\|", 78 );
+        System.out.println( "Total datavalues = " + dataValues.length );
+
+        for ( int i = 0; i < dataValues.length; i++ )
+        {
+            System.out.println( "Values = " + dataValues[i] );
+        }
+        if ( dataValues.length == 78 )
+        {
+            File file = new File( dhis2Home + "\\mi\\pending\\" + phoneNumber + sendTime.replace( ":", "-" ) + ".xml" );
+            try
+            {
+                System.out.println( file.getAbsolutePath() );
+                FileWriter writer = new FileWriter( file );
+                writer.write( "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" );
+                writer.write( "<dxf>\n" );
+                writer.write( "<source>" + phoneNumber + "</source>\n" );
+                if ( period.length() == 1 )
+                {
+                    writer.write( "<period>2009-0" + period + "-01</period>\n" );
+                } else
+                {
+                    if ( period.length() == 2 )
+                    {
+                        if ( Integer.parseInt( period ) > 12 && Integer.parseInt( period ) < 22 )
+                        {
+                            writer.write( "<period>2008-0" + ( Integer.parseInt( period ) - 12 ) + "-01</period>\n" );
+                        } else
+                        {
+                            if ( Integer.parseInt( period ) >= 22 )
+                            {
+                                writer.write( "<period>2008-" + ( Integer.parseInt( period ) - 12 ) + "-01</period>\n" );
+                            } else
+                            {
+                                writer.write( "<period>2009-" + period + "-01</period>\n" );
+                            }
+                        }
+                    } else
+                    {
+                        writer.write( "<period>" + period + "</period>\n" );
+                    }
+                }
+                writer.write( "<timeStamp>" + sendTime + "</timeStamp>\n" );
+                for ( int i = 0; i < elementIds.length; i++ )
+                {
+                    if ( dataValues[i].isEmpty() )
+                    {
+                        continue;
+                    }
+                    writer.write( "<dataValue>\n" );
+                    writer.write( "<dataElement>" + elementIds[i] + "</dataElement>\n" );
+                    writer.write( "<value>" + dataValues[i] + "</value>\n" );
+                    writer.write( "</dataValue>\n" );
+                }
+                writer.write( "<info>" + info + "</info>\n" );
+                writer.write( "</dxf>\n" );
+                writer.close();
+            } catch ( IOException ex )
+            {
+                return;
+            }
+        }
+    }
+}

=== modified file 'dhis-mobile/dhis-web-mobile/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-mobile/dhis-web-mobile/src/main/resources/META-INF/dhis/beans.xml	2010-04-02 02:37:49 +0000
+++ dhis-mobile/dhis-web-mobile/src/main/resources/META-INF/dhis/beans.xml	2010-04-05 23:39:09 +0000
@@ -8,6 +8,11 @@
 		class="org.hisp.dhis.mobile.action.MobileHomePageAction"
 		scope="prototype">
     </bean>
+    <bean id="org.hisp.dhis.mobile.action.ReceiveImportPageAction"
+		class="org.hisp.dhis.mobile.action.ReceiveImportPageAction"
+		scope="prototype">
+            <property name="smsService" ref="org.hisp.dhis.mobile.SmsService" />
+    </bean>
 
     <bean id="org.hisp.dhis.mobile.app.action.CreateMobileAppAction"
 		class="org.hisp.dhis.mobile.app.action.CreateMobileAppAction"

=== modified file 'dhis-mobile/dhis-web-mobile/src/main/resources/struts.xml'
--- dhis-mobile/dhis-web-mobile/src/main/resources/struts.xml	2010-03-18 00:21:22 +0000
+++ dhis-mobile/dhis-web-mobile/src/main/resources/struts.xml	2010-04-05 23:39:09 +0000
@@ -6,16 +6,25 @@
     <!-- use the DHIS web portal default -->
     <include file="dhis-web-commons.xml"/>
     <package name="dhis-web-mobile" extends="dhis-web-commons" namespace="/dhis-web-mobile">
+
+        <!-- Pages -->
         <action name="index" class="org.hisp.dhis.mobile.action.MobileHomePageAction">
             <result name="success" type="velocity">/main.vm</result>
             <param name="page">/dhis-web-mobile/welcome.vm</param>
             <param name="menu">/dhis-web-mobile/menu.vm</param>
         </action>
+        <action name="receiveImport"
+                class="org.hisp.dhis.mobile.action.ReceiveImportPageAction">
+            <result name="success" type="velocity">/main.vm</result>
+            <param name="page">/dhis-web-mobile/receiveImportPage.vm</param>
+            <param name="menu">/dhis-web-mobile/menu.vm</param>
+            <param name="stylesheets">css/receiveImportPage.css</param>
+        </action>
 
         <!-- Create Mobile Application -->
         <action name="createMobileApp" class="org.hisp.dhis.mobile.app.action.CreateMobileAppAction">
             <result name="success" type="velocity">/main.vm</result>
-            <param name="page">/dhis-web-mobile/createMobileApp.vm</param>
+            <param name="page">/dhis-web-mobile/createMobileAppPage.vm</param>
             <param name="menu">/dhis-web-mobile/menu.vm</param>
         </action>
 
@@ -43,7 +52,7 @@
             <param name="menu">/dhis-web-mobile/menu.vm</param>
         </action>
 
-        <!-- Process Mobile Importing -->
+        <!-- Mobile Importing -->
         <action name="processMobileImport"
                 class="org.hisp.dhis.mobileimport.action.MobileImportProcessAction">
             <result name="success" type="velocity">/main.vm</result>

=== modified file 'dhis-mobile/dhis-web-mobile/src/main/webapp/dhis-web-mobile/create.html'
--- dhis-mobile/dhis-web-mobile/src/main/webapp/dhis-web-mobile/create.html	2010-04-02 02:37:49 +0000
+++ dhis-mobile/dhis-web-mobile/src/main/webapp/dhis-web-mobile/create.html	2010-04-05 23:39:09 +0000
@@ -1,41 +1,49 @@
-<style type="text/css">
-    .statusBar{
-        color: white;
-        padding: 5px 5px;
-        margin: -16px 0 20px -20px;
-        font-weight: bold;
-    }
-</style>
 <script type="text/javascript">
-    $(document).ready(function(){
-        var statusOptions = {
-            url: 'toggleStatus.action',
-            target: '#serviceStat',
-            success: function(){
-                $("#splashUpdate input:radio:first").attr("checked","checked");
-            }
-        }
-        $("#splashForm").ajaxForm(statusOptions);
-    });
+    function showPending(){
+        $("#pendingItems").toggle();
+    }
+    function showBounced(){
+        $("#bouncedItems").toggle();
+    }
 </script>
 
 #if ($smsServiceStatus)
-<form class="statusBar" style="background-color: olive" >SMS Service:  Started
-    <input type="submit" value="Stop Service" />
-</form>
+<div class="header" style="background-color: olive">Receive SMS -
+    <form method="post">SMS Service: Started
+        <input type="submit" name="statAction" value="Stop" />
+    </form>
+</div>
 #else
-<form class="statusBar" style="background-color: #8FABC7">SMS Service:  Not Started
-    <input type="submit" value="Start Service" />
-</form>
+<div class="header">Receive SMS -
+    <form method="post">SMS Service: Not Started
+        <input type="submit" name="statAction" value="Start" />
+    </form>
+</div>
 #end
-<h1>Send SMS</h1>
+<div class="box">
 
-<div style="float:left">
-    <form action="post">
-        <table>
-            <tr><td>Phone #:</td><td><input type="text"/></td></tr>
-            <tr><td></td><td><textarea cols="50" rows="10"></textarea></td></tr>
-            <tr><td></td><td><input type="submit" value="Send SMS"/></td>
-        </table>
-    </form>
+</div>
+<br>
+<br>
+<div class="header">Import SMS</div>
+<div class="box">
+    <table class="mainTable">
+        <tbody>
+            <tr>
+                <th width="33%">Pending ($pending.size())</th>
+                <th width="33%">Bounced ($bounced.size())</th>
+                <th width="33%">Completed ($completed.size())</th>
+            </tr>
+            <tr>
+                <td><a href="javascript:showPending()">Show/Hide Details</a></td>
+                <td><a href="javascript:showBounced()">Show/Hide Details</a></td>
+                <td>$completed.size() Already Imported</td>
+            </tr>
+            <tr>
+                <td style="display: none" id="pendingItems"><ol>#foreach ($item in $pending)<li>$item</li>#end</ol></td>
+                <td style="display: none" id="bouncedItems"><ol>#foreach ($item in $bounced)<li>$item</li>#end</ol></td>
+                <td></td>
+            </tr>
+        </tbody>
+    </table>
 </div>
\ No newline at end of file

=== removed file 'dhis-mobile/dhis-web-mobile/src/main/webapp/dhis-web-mobile/createMobileApp.vm'
--- dhis-mobile/dhis-web-mobile/src/main/webapp/dhis-web-mobile/createMobileApp.vm	2010-03-21 14:27:54 +0000
+++ dhis-mobile/dhis-web-mobile/src/main/webapp/dhis-web-mobile/createMobileApp.vm	1970-01-01 00:00:00 +0000
@@ -1,101 +0,0 @@
-<link type="text/css" rel="stylesheet" media="screen" href="../dhis-web-commons/util/css/redmond/jquery-ui.css">
-<script type="text/javascript" src="../dhis-web-commons/util/jquery-ui.js"></script>
-<script type="text/javascript" src="javascript/jquery-form.js"></script>
-<script type="text/javascript" src="javascript/createMobileApp.js"></script>
-<table width="100%">
-    <tr>
-        <td>
-            <h1>Create Mobile Application</h1>
-            <div id="mvnStatusDiv">
-                #set ($path = "$!mvnPath")
-                #if($path != "")
-                #set ($status = "$!mvnStatus")
-                #if($status != "")
-                <span style="color:red">$status</span> <br/>
-                #end
-                <img src="../images/check.png" alt="" /> Using mvn found in PATH at $path (<a href="javascript: showPathField()">Change</a>)<br/><br/>
-                <div id="mvnDiv">
-                    <form id="mvnForm" method="post">
-                        Enter mvn Folder Path: <input name="mvnPath" type="text" value="$!mvnPath" size="40" />
-                        <input type="button" value="Set mvn Path" onclick="submitMvnForm()" />
-                    </form>
-                </div>
-                #else
-                #set ($status = "$!mvnStatus")
-                #if($status != "")
-                <span style="color:red">$status</span>
-                #end
-                mvn not found... Please configure mvn location <br/>
-                <form id="mvnForm" method="post">
-                    Enter mvn Folder Path: <input name="mvnPath" type="text" value="$!mvnPath" size="40" />
-                    <input type="button" value="Set mvn Path" onclick="submitMvnForm()" />
-                </form>
-                #end
-            </div>
-        </td>
-        <td align="right">
-            #if ($mobileAppFilename)
-            <a href="javame_src/target/$mobileAppFilename">Download $mobileAppFilename</a>
-            #end
-        </td>
-    </tr>
-</table>
-
-<input id="mvnBin" style=" visibility: hidden" name="mvnBin" value="$path"/>
-<div id="accordion">
-    <h3><a href="#">Step 1: Splash Screen Selection</a></h3>
-    <div id="splashDesigner" style="height: 180px">
-        <div id="splashUpdate">
-            <table>
-                <tr>
-                    #foreach($var in $splashImg)
-                    <td>
-                        <div style=" width: 96px; height: 120px; border: dotted; text-align: center;">
-                            <img style="margin-top: 30px" alt="" src="javame_src/src/main/resources/splash/$var" width="60" height="60"/> <br/>
-                            <input style="bottom: 5px" type="radio" name="splash" value="$var" />
-                        </div>
-                    </td>
-                    #end
-                </tr>
-            </table>
-        </div> <br/>
-        <div>
-            <form id="splashForm" method="post" enctype="multipart/form-data">
-                Splash Image: <input type="file" name="upload" size="40" />
-                <input type="submit" value="Upload Image" />
-            </form>
-        </div>
-    </div>
-    <h3><a href="#">Step 2: Dataset Selection</a></h3>
-    <div id="dataSetSelector">
-        <form id="dataSetForm">
-            <select name="dataSetName" style="vertical-align: top" >
-                #foreach($var in $availableDatasets)
-                <option>$var</option>
-                #end
-            </select>
-            <a href="#" onclick="addDataSet()"><img src="../images/add.png" alt="" align="top" width="16" /></a>
-            <span id="dataElementsListDiv"></span>
-        </form>
-    </div>
-    <h3><a href="#">Step 3: Set Pages</a></h3>
-    <div id="pageSelector">
-        <p>
-
-        </p>
-    </div>
-    <h3><a href="#">Step 4: Select Language Or Translate Data Elements</a></h3>
-    <div id="languageSelector">
-        <table>
-            <tr>
-                <td>English<input type="checkbox" name="langEng" value="English" /></td>
-                <td>Gujarati<input type="checkbox" name="langGuj" value="Gujarati" /></td>
-                <td>Punjabi<input type="checkbox" name="langPun" value="Punjabi" /></td>
-            </tr>
-        </table>
-    </div>
-    <h3><a href="#">Step 5: Generate Application</a></h3>
-    <div id="jarGenerator">
-        <input id="genButton" type="button" value="Generate Mobile Application" onclick="submitJarGenerator()" />
-    </div>
-</div>
\ No newline at end of file

=== added file 'dhis-mobile/dhis-web-mobile/src/main/webapp/dhis-web-mobile/createMobileAppPage.vm'
--- dhis-mobile/dhis-web-mobile/src/main/webapp/dhis-web-mobile/createMobileAppPage.vm	1970-01-01 00:00:00 +0000
+++ dhis-mobile/dhis-web-mobile/src/main/webapp/dhis-web-mobile/createMobileAppPage.vm	2010-04-05 23:39:09 +0000
@@ -0,0 +1,101 @@
+<link type="text/css" rel="stylesheet" media="screen" href="../dhis-web-commons/util/css/redmond/jquery-ui.css">
+<script type="text/javascript" src="../dhis-web-commons/util/jquery-ui.js"></script>
+<script type="text/javascript" src="javascript/jquery-form.js"></script>
+<script type="text/javascript" src="javascript/createMobileApp.js"></script>
+<table width="100%">
+    <tr>
+        <td>
+            <h1>Create Mobile Application</h1>
+            <div id="mvnStatusDiv">
+                #set ($path = "$!mvnPath")
+                #if($path != "")
+                #set ($status = "$!mvnStatus")
+                #if($status != "")
+                <span style="color:red">$status</span> <br/>
+                #end
+                <img src="../images/check.png" alt="" /> Using mvn found in PATH at $path (<a href="javascript: showPathField()">Change</a>)<br/><br/>
+                <div id="mvnDiv">
+                    <form id="mvnForm" method="post">
+                        Enter mvn Folder Path: <input name="mvnPath" type="text" value="$!mvnPath" size="40" />
+                        <input type="button" value="Set mvn Path" onclick="submitMvnForm()" />
+                    </form>
+                </div>
+                #else
+                #set ($status = "$!mvnStatus")
+                #if($status != "")
+                <span style="color:red">$status</span>
+                #end
+                mvn not found... Please configure mvn location <br/>
+                <form id="mvnForm" method="post">
+                    Enter mvn Folder Path: <input name="mvnPath" type="text" value="$!mvnPath" size="40" />
+                    <input type="button" value="Set mvn Path" onclick="submitMvnForm()" />
+                </form>
+                #end
+            </div>
+        </td>
+        <td align="right">
+            #if ($mobileAppFilename)
+            <a href="javame_src/target/$mobileAppFilename">Download $mobileAppFilename</a>
+            #end
+        </td>
+    </tr>
+</table>
+
+<input id="mvnBin" style=" visibility: hidden" name="mvnBin" value="$path"/>
+<div id="accordion">
+    <h3><a href="#">Step 1: Splash Screen Selection</a></h3>
+    <div id="splashDesigner" style="height: 180px">
+        <div id="splashUpdate">
+            <table>
+                <tr>
+                    #foreach($var in $splashImg)
+                    <td>
+                        <div style=" width: 96px; height: 120px; border: dotted; text-align: center;">
+                            <img style="margin-top: 30px" alt="" src="javame_src/src/main/resources/splash/$var" width="60" height="60"/> <br/>
+                            <input style="bottom: 5px" type="radio" name="splash" value="$var" />
+                        </div>
+                    </td>
+                    #end
+                </tr>
+            </table>
+        </div> <br/>
+        <div>
+            <form id="splashForm" method="post" enctype="multipart/form-data">
+                Splash Image: <input type="file" name="upload" size="40" />
+                <input type="submit" value="Upload Image" />
+            </form>
+        </div>
+    </div>
+    <h3><a href="#">Step 2: Dataset Selection</a></h3>
+    <div id="dataSetSelector">
+        <form id="dataSetForm">
+            <select name="dataSetName" style="vertical-align: top" >
+                #foreach($var in $availableDatasets)
+                <option>$var</option>
+                #end
+            </select>
+            <a href="#" onclick="addDataSet()"><img src="../images/add.png" alt="" align="top" width="16" /></a>
+            <span id="dataElementsListDiv"></span>
+        </form>
+    </div>
+    <h3><a href="#">Step 3: Set Pages</a></h3>
+    <div id="pageSelector">
+        <p>
+
+        </p>
+    </div>
+    <h3><a href="#">Step 4: Select Language Or Translate Data Elements</a></h3>
+    <div id="languageSelector">
+        <table>
+            <tr>
+                <td>English<input type="checkbox" name="langEng" value="English" /></td>
+                <td>Gujarati<input type="checkbox" name="langGuj" value="Gujarati" /></td>
+                <td>Punjabi<input type="checkbox" name="langPun" value="Punjabi" /></td>
+            </tr>
+        </table>
+    </div>
+    <h3><a href="#">Step 5: Generate Application</a></h3>
+    <div id="jarGenerator">
+        <input id="genButton" type="button" value="Generate Mobile Application" onclick="submitJarGenerator()" />
+    </div>
+</div>
\ No newline at end of file

=== added file 'dhis-mobile/dhis-web-mobile/src/main/webapp/dhis-web-mobile/css/receiveImportPage.css'
--- dhis-mobile/dhis-web-mobile/src/main/webapp/dhis-web-mobile/css/receiveImportPage.css	1970-01-01 00:00:00 +0000
+++ dhis-mobile/dhis-web-mobile/src/main/webapp/dhis-web-mobile/css/receiveImportPage.css	2010-04-05 23:39:09 +0000
@@ -0,0 +1,27 @@
+.header{
+    color: white;
+    padding: 5px 5px;
+    margin: -16px 0 0 -20px;
+    font-weight: bold;
+    background-color: #8FABC7;
+}
+.box{
+    position:relative;
+    border: 1px solid #8FABC7;
+    padding: 5px 5px;
+    margin-left: -20px;
+}
+.mainTable{
+    width: 100%;
+    border-collapse: collapse;
+}
+.mainTable th{
+    border: 1px solid #C3C3C3;
+    padding: 3px;
+    vertical-align: top;
+}
+.mainTable td{
+    border: 1px solid #C3C3C3;
+    padding: 3px;
+    vertical-align: top;
+}
\ No newline at end of file

=== modified file 'dhis-mobile/dhis-web-mobile/src/main/webapp/dhis-web-mobile/menu.vm'
--- dhis-mobile/dhis-web-mobile/src/main/webapp/dhis-web-mobile/menu.vm	2009-12-11 10:30:31 +0000
+++ dhis-mobile/dhis-web-mobile/src/main/webapp/dhis-web-mobile/menu.vm	2010-04-05 23:39:09 +0000
@@ -1,6 +1,6 @@
 <h2>DHIS Mobile</h2>
 <ul>
     <li><a href = "createMobileApp.action">Create Mobile Application</a></li>
-    <li><a href = "processMobileImport.action">Receive Data and Import</a></li>
+    <li><a href = "receiveImport.action">Receive Data and Import</a></li>
     <li><a href = "sendSMSPage.action">Send SMS</a></li>
 </ul>
\ No newline at end of file

=== added file 'dhis-mobile/dhis-web-mobile/src/main/webapp/dhis-web-mobile/receiveImportPage.vm'
--- dhis-mobile/dhis-web-mobile/src/main/webapp/dhis-web-mobile/receiveImportPage.vm	1970-01-01 00:00:00 +0000
+++ dhis-mobile/dhis-web-mobile/src/main/webapp/dhis-web-mobile/receiveImportPage.vm	2010-04-05 23:39:09 +0000
@@ -0,0 +1,49 @@
+<script type="text/javascript">
+    function showPending(){
+        $("#pendingItems").toggle();
+    }
+    function showBounced(){
+        $("#bouncedItems").toggle();
+    }
+</script>
+
+#if ($smsServiceStatus)
+<div class="header" style="background-color: olive">Receive SMS -
+    <form method="post">SMS Service: Started
+        <input type="submit" name="statAction" value="Stop" />
+    </form>
+</div>
+#else
+<div class="header">Receive SMS -
+    <form method="post">SMS Service: Not Started
+        <input type="submit" name="statAction" value="Start" />
+    </form>
+</div>
+#end
+<div class="box">
+
+</div>
+<br>
+<br>
+<div class="header">Import SMS</div>
+<div class="box">
+    <table class="mainTable">
+        <tbody>
+            <tr>
+                <th width="33%">Pending ($pending.size())</th>
+                <th width="33%">Bounced ($bounced.size())</th>
+                <th width="33%">Completed ($completed.size())</th>
+            </tr>
+            <tr>
+                <td><a href="javascript:showPending()">Show/Hide Details</a></td>
+                <td><a href="javascript:showBounced()">Show/Hide Details</a></td>
+                <td>$completed.size() Already Imported</td>
+            </tr>
+            <tr>
+                <td style="display: none" id="pendingItems"><ol>#foreach ($item in $pending)<li>$item</li>#end</ol></td>
+                <td style="display: none" id="bouncedItems"><ol>#foreach ($item in $bounced)<li>$item</li>#end</ol></td>
+                <td></td>
+            </tr>
+        </tbody>
+    </table>
+</div>
\ No newline at end of file

=== modified file 'dhis-mobile/dhis-web-mobile/src/main/webapp/dhis-web-mobile/sendSMSPage.vm'
--- dhis-mobile/dhis-web-mobile/src/main/webapp/dhis-web-mobile/sendSMSPage.vm	2010-04-02 02:37:49 +0000
+++ dhis-mobile/dhis-web-mobile/src/main/webapp/dhis-web-mobile/sendSMSPage.vm	2010-04-05 23:39:09 +0000
@@ -4,24 +4,23 @@
         padding: 5px 5px;
         margin: -16px 0 20px -20px;
         font-weight: bold;
+        background-color: #8FABC7;
     }
 </style>
-<script type="text/javascript">
-    
-</script>
 
-#if ($smsServiceStatus)
-<form class="statusBar" method="post" style="background-color: olive" >SMS Service: Started
-    <input type="submit" name="statAction" value="Stop" />
-</form>
-#else
-<form class="statusBar" method="post" style="background-color: #8FABC7">SMS Service: Not Started
-    <input type="submit" name="statAction" value="Start" />
-</form>
-#end
+<div class="statusBar" #if ($smsServiceStatus)style="background-color: olive"#end>
+    #if ($smsServiceStatus)
+    <form method="post">SMS Service: Started
+        <input type="submit" name="statAction" value="Stop" />
+    </form>
+    #else
+    <form method="post">SMS Service: Not Started
+        <input type="submit" name="statAction" value="Start" />
+    </form>
+    #end
+</div>
 <h1>Send SMS</h1>
-
-<div style="float:left">
+<div>
     <form method="post">
         <table>
             <tr><td>Phone #:</td><td><input name="recipient" type="text"/></td></tr>