← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 5061: move DataSet for Mobile from dhis-web-maintenance-dataset to dhis-web-maintenance-mobile. Fix som...

 

------------------------------------------------------------
revno: 5061
committer: Long <thanhlongngo1988>
branch nick: dhis2
timestamp: Mon 2011-10-31 18:38:27 +0700
message:
  move DataSet for Mobile from dhis-web-maintenance-dataset to dhis-web-maintenance-mobile. Fix some missing I18n.
removed:
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/MobileDataSetListAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/UpdateMobileDataSetAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/mobileDatasetList.vm
added:
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/java/org/hisp/dhis/mobile/action/MobileDataSetListAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/java/org/hisp/dhis/mobile/action/UpdateMobileDataSetAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/webapp/dhis-web-maintenance-mobile/mobileDatasetList.vm
modified:
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/resources/META-INF/dhis/beans.xml
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/resources/struts.xml
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/index.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/menu.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/resources/META-INF/dhis/beans.xml
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/resources/org/hisp/dhis/mobile/i18n_module.properties
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/resources/struts.xml
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/webapp/dhis-web-maintenance-mobile/menu.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
=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/MobileDataSetListAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/MobileDataSetListAction.java	2011-07-13 09:32:37 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/MobileDataSetListAction.java	1970-01-01 00:00:00 +0000
@@ -1,78 +0,0 @@
-package org.hisp.dhis.dataset.action;
-
-/*
- * Copyright (c) 2004-2010, 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 java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-import org.hisp.dhis.dataset.DataSet;
-import org.hisp.dhis.dataset.DataSetService;
-import org.hisp.dhis.dataset.comparator.DataSetNameComparator;
-
-import com.opensymphony.xwork2.Action;
-
-public class MobileDataSetListAction
-    implements Action
-{
-    // -------------------------------------------------------------------------
-    // Dependencies
-    // -------------------------------------------------------------------------
-
-    private DataSetService dataSetService;
-
-    public void setDataSetService( DataSetService dataSetService )
-    {
-        this.dataSetService = dataSetService;
-    }
-    
-    // -------------------------------------------------------------------------
-    // Getters and Setters
-    // -------------------------------------------------------------------------
-    private List<DataSet> mobileDatasets;
-
-    public List<DataSet> getMobileDatasets()
-    {
-        return mobileDatasets;
-    }
-
-    public void setMobileDatasets( List<DataSet> mobileDatasets )
-    {
-        this.mobileDatasets = mobileDatasets;
-    }
-
-    @Override
-    public String execute()
-        throws Exception
-    {
-        mobileDatasets = new ArrayList<DataSet>(dataSetService.getDataSetsForMobile());
-        Collections.sort( mobileDatasets, new DataSetNameComparator() );
-        
-        return SUCCESS;
-    }
-}

=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/UpdateMobileDataSetAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/UpdateMobileDataSetAction.java	2011-07-13 09:32:37 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/UpdateMobileDataSetAction.java	1970-01-01 00:00:00 +0000
@@ -1,69 +0,0 @@
-package org.hisp.dhis.dataset.action;
-
-import java.util.Collection;
-import java.util.HashSet;
-
-import org.hisp.dhis.dataset.DataSet;
-import org.hisp.dhis.dataset.DataSetService;
-
-import com.opensymphony.xwork2.Action;
-
-public class UpdateMobileDataSetAction
-    implements Action
-{
-    // -------------------------------------------------------------------------
-    // Dependencies
-    // -------------------------------------------------------------------------
-    private DataSetService dataSetService;
-
-    public void setDataSetService( DataSetService dataSetService )
-    {
-        this.dataSetService = dataSetService;
-    }
-
-    // -------------------------------------------------------------------------
-    // Input/Output
-    // -------------------------------------------------------------------------
-    private Collection<String> selectedList = new HashSet<String>();
-
-    public void setSelectedList( Collection<String> selectedList )
-    {
-        this.selectedList = selectedList;
-    }
-
-    private Collection<String> availableList = new HashSet<String>();
-
-    public void setAvailableList( Collection<String> availableList )
-    {
-        this.availableList = availableList;
-    }
-
-    @Override
-    public String execute()
-        throws Exception
-    {
-        DataSet dataset = null;
-        for ( String id : selectedList )
-        {
-            dataset = dataSetService.getDataSet( Integer.parseInt( id ) );
-            if ( !dataset.isMobile() )
-            {
-                dataset.setMobile( true );
-                dataSetService.updateDataSet( dataset );
-            }
-        }
-     
-        for ( String id : availableList )
-        {
-            dataset = dataSetService.getDataSet( Integer.parseInt( id ) );
-            if ( dataset.isMobile() )
-            {
-                dataset.setMobile( false );
-                dataSetService.updateDataSet( dataset );
-            }
-        }
-
-        return SUCCESS;
-    }
-
-}

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/resources/META-INF/dhis/beans.xml	2011-08-27 10:06:52 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/resources/META-INF/dhis/beans.xml	2011-10-31 11:38:27 +0000
@@ -127,20 +127,6 @@
   </bean>		
 	
 	<!-- DataSet -->
-  <bean id="org.hisp.dhis.dataset.action.MobileDataSetListAction" class="org.hisp.dhis.dataset.action.MobileDataSetListAction"
-    scope="prototype">
-    <property name="dataSetService">
-      <ref bean="org.hisp.dhis.dataset.DataSetService" />
-    </property>
-  </bean>
-
-  <bean id="org.hisp.dhis.dataset.action.UpdateMobileDataSetAction" class="org.hisp.dhis.dataset.action.UpdateMobileDataSetAction"
-    scope="prototype">
-    <property name="dataSetService">
-      <ref bean="org.hisp.dhis.dataset.DataSetService" />
-    </property>
-  </bean>
-
 
   <bean id="org.hisp.dhis.dataset.action.DefineDataSetAssociationsAction" class="org.hisp.dhis.dataset.action.DefineDataSetAssociationsAction"
     scope="prototype">

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/resources/struts.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/resources/struts.xml	2011-09-27 09:10:27 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/resources/struts.xml	2011-10-31 11:38:27 +0000
@@ -15,17 +15,7 @@
     </action>
 
 	<!-- Dataset -->
-
-    <action name="showMobileDataSet" class="org.hisp.dhis.dataset.action.MobileDataSetListAction">
-      <result name="success" type="velocity">/main.vm</result>
-      <param name="page">/dhis-web-maintenance-dataset/mobileDatasetList.vm</param>
-      <param name="menu">/dhis-web-maintenance-dataset/menu.vm</param>
-    </action>
-
-    <action name="updateMobileDataset" class="org.hisp.dhis.dataset.action.UpdateMobileDataSetAction">
-      <result name="success" type="redirect">showMobileDataSet.action</result>
-    </action>
-
+	  
     <action name="dataSet" class="org.hisp.dhis.dataset.action.DataSetListAction">
       <result name="success" type="velocity">/main.vm</result>
       <param name="page">/dhis-web-maintenance-dataset/dataSetList.vm</param>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/index.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/index.vm	2011-08-26 20:38:26 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/index.vm	2011-10-31 11:38:27 +0000
@@ -11,5 +11,4 @@
     #introListImgItem( "dataSet.action" "dataset" "dataset" )
     #introListImgItem( "section.action" "dataset_section" "dataset" )
     #introListImgItem( "displayEditorForm.action" "dataset_assignment_editor" "dataset" )
-    #introListImgItem( "showMobileDataSet.action" "mobile_dataset" "dataset" )
 </ul>
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/menu.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/menu.vm	2011-08-26 20:38:26 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/menu.vm	2011-10-31 11:38:27 +0000
@@ -4,5 +4,4 @@
 	<li><a href="dataSet.action">$i18n.getString( "dataset" )&nbsp;</a></li>
 	<li><a href="section.action">$i18n.getString( "dataset_section" )&nbsp;</a></li>
 	<li><a href="displayEditorForm.action">$i18n.getString( "dataset_assignment_editor" )&nbsp;</a></li>
-	<li><a href="showMobileDataSet.action">$i18n.getString( "mobile_dataset" )&nbsp;</a></li>
 </ul>
\ No newline at end of file

=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/mobileDatasetList.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/mobileDatasetList.vm	2011-07-13 09:32:37 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/mobileDatasetList.vm	1970-01-01 00:00:00 +0000
@@ -1,72 +0,0 @@
-<script type="text/javascript">
-	jQuery(document).ready(	function(){
-		jQuery("#availableList").dhisAjaxSelect({
-			source: "../dhis-web-commons-ajax-json/getDataSets.action",
-			iterator: 'dataSets',
-			connectedTo: 'selectedList',
-			handler: function(item) {
-				var option = jQuery("<option />");
-				option.text( item.name + "-Version " + item.version );
-				option.attr( "value", item.id );
-
-				return option;
-			}
-		});
-		
-		jQuery("#save").bind("click", function(e) {
-			jQuery("#availableList").children().attr("selected", "selected");
-			jQuery("#selectedList").children().attr("selected", "selected");
-		});
-	});
-</script>
-
-<h3>$i18n.getString( "mobile_dataset" )</h3>
-<form id="updateMobileDataset" name="updateMobileDataset" action="updateMobileDataset.action" method="post">
-<table id="dataSetSelectionArea">
-    <col style="width: 450px"/>
-    <col/>
-    <col style="width: 450px"/>
-
-    <thead>
-      <tr>
-        <th>$i18n.getString( "available_datasets" )</th>
-		<th>$i18n.getString( "filter" )</th>
-        <th>$i18n.getString( "mobile_dataset" )</th>
-      </tr>
-    </thead>
-
-    <tbody>
-		<tr>
-		  <!---->
-		  <td>
-		  	<select id="availableList" name="availableList" multiple="multiple" style="height: 200px; width: 100%;"></select>          
-          </td>
-
-        <td style="text-align:center">
-        	<input type="button" value="&gt;" title="$i18n.getString( 'move_selected' )" style="width:50px" onclick="dhisAjaxSelect_moveAllSelected( 'availableList' );"/><br/>
-            <input type="button" value="&lt;" title="$i18n.getString( 'remove_selected' )" style="width:50px" onclick="dhisAjaxSelect_moveAllSelected( 'selectedList' );"/><br/>
-			<input type="button" value="&gt;&gt;" title="$i18n.getString('move_all')" style="width:50px" onclick="dhisAjaxSelect_moveAll( 'availableList' );"/><br/>
-			<input type="button" value="&lt;&lt;" title="$i18n.getString('remove_all')" style="width:50px" onclick="dhisAjaxSelect_moveAll( 'selectedList' );"/>
-        </td>
-
-        <td>
-          <select id="selectedList" name="selectedList" multiple="multiple" style="height: 200px; width: 100%; margin-top: 22px;">
-        	#foreach( $mobiledataset in $mobileDatasets )
-      			<option value="$mobiledataset.id">$encoder.htmlEncode( $mobiledataset.name )-Version $mobiledataset.version</option>
-    		#end
-          </select>
-        </td>
-
-        <td style="width:30px; text-align:center">
-            <a href="javascript:moveUpSelectedOption( 'selectedList' )"><img src="../images/move_up.png"/></a><br/><br/>
-            <a href="javascript:moveDownSelectedOption( 'selectedList' )"><img src="../images/move_down.png"/></a><br/><br/>
-        </td>
-		</tr>
-		<tr>
-        <td colspan="3">
-          <input id="save" type="submit" value="$i18n.getString( 'save' )" style="width:20em"/>
-        </td>
-      </tr>
-	</tbody>
-</table>
-</form>

=== added file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/java/org/hisp/dhis/mobile/action/MobileDataSetListAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/java/org/hisp/dhis/mobile/action/MobileDataSetListAction.java	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/java/org/hisp/dhis/mobile/action/MobileDataSetListAction.java	2011-10-31 11:38:27 +0000
@@ -0,0 +1,78 @@
+package org.hisp.dhis.mobile.action;
+
+/*
+ * Copyright (c) 2004-2010, 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 java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import org.hisp.dhis.dataset.DataSet;
+import org.hisp.dhis.dataset.DataSetService;
+import org.hisp.dhis.dataset.comparator.DataSetNameComparator;
+
+import com.opensymphony.xwork2.Action;
+
+public class MobileDataSetListAction
+    implements Action
+{
+    // -------------------------------------------------------------------------
+    // Dependencies
+    // -------------------------------------------------------------------------
+
+    private DataSetService dataSetService;
+
+    public void setDataSetService( DataSetService dataSetService )
+    {
+        this.dataSetService = dataSetService;
+    }
+    
+    // -------------------------------------------------------------------------
+    // Getters and Setters
+    // -------------------------------------------------------------------------
+    private List<DataSet> mobileDatasets;
+
+    public List<DataSet> getMobileDatasets()
+    {
+        return mobileDatasets;
+    }
+
+    public void setMobileDatasets( List<DataSet> mobileDatasets )
+    {
+        this.mobileDatasets = mobileDatasets;
+    }
+
+    @Override
+    public String execute()
+        throws Exception
+    {
+        mobileDatasets = new ArrayList<DataSet>(dataSetService.getDataSetsForMobile());
+        Collections.sort( mobileDatasets, new DataSetNameComparator() );
+        
+        return SUCCESS;
+    }
+}

=== added file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/java/org/hisp/dhis/mobile/action/UpdateMobileDataSetAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/java/org/hisp/dhis/mobile/action/UpdateMobileDataSetAction.java	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/java/org/hisp/dhis/mobile/action/UpdateMobileDataSetAction.java	2011-10-31 11:38:27 +0000
@@ -0,0 +1,69 @@
+package org.hisp.dhis.mobile.action;
+
+import java.util.Collection;
+import java.util.HashSet;
+
+import org.hisp.dhis.dataset.DataSet;
+import org.hisp.dhis.dataset.DataSetService;
+
+import com.opensymphony.xwork2.Action;
+
+public class UpdateMobileDataSetAction
+    implements Action
+{
+    // -------------------------------------------------------------------------
+    // Dependencies
+    // -------------------------------------------------------------------------
+    private DataSetService dataSetService;
+
+    public void setDataSetService( DataSetService dataSetService )
+    {
+        this.dataSetService = dataSetService;
+    }
+
+    // -------------------------------------------------------------------------
+    // Input/Output
+    // -------------------------------------------------------------------------
+    private Collection<String> selectedList = new HashSet<String>();
+
+    public void setSelectedList( Collection<String> selectedList )
+    {
+        this.selectedList = selectedList;
+    }
+
+    private Collection<String> availableList = new HashSet<String>();
+
+    public void setAvailableList( Collection<String> availableList )
+    {
+        this.availableList = availableList;
+    }
+
+    @Override
+    public String execute()
+        throws Exception
+    {
+        DataSet dataset = null;
+        for ( String id : selectedList )
+        {
+            dataset = dataSetService.getDataSet( Integer.parseInt( id ) );
+            if ( !dataset.isMobile() )
+            {
+                dataset.setMobile( true );
+                dataSetService.updateDataSet( dataset );
+            }
+        }
+     
+        for ( String id : availableList )
+        {
+            dataset = dataSetService.getDataSet( Integer.parseInt( id ) );
+            if ( dataset.isMobile() )
+            {
+                dataset.setMobile( false );
+                dataSetService.updateDataSet( dataset );
+            }
+        }
+
+        return SUCCESS;
+    }
+
+}

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/resources/META-INF/dhis/beans.xml	2011-10-18 20:23:09 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/resources/META-INF/dhis/beans.xml	2011-10-31 11:38:27 +0000
@@ -23,6 +23,21 @@
     <property name="patientMobileSettingService" ref="org.hisp.dhis.mobile.service.PatientMobileSettingService" />
     <property name="patientAttributeService" ref="org.hisp.dhis.patient.PatientAttributeService" />
   </bean>
+	
+		<!-- Mobile DataSet -->
+  <bean id="org.hisp.dhis.mobile.action.MobileDataSetListAction" class="org.hisp.dhis.mobile.action.MobileDataSetListAction"
+    scope="prototype">
+    <property name="dataSetService">
+      <ref bean="org.hisp.dhis.dataset.DataSetService" />
+    </property>
+  </bean>
+
+  <bean id="org.hisp.dhis.mobile.action.UpdateMobileDataSetAction" class="org.hisp.dhis.mobile.action.UpdateMobileDataSetAction"
+    scope="prototype">
+    <property name="dataSetService">
+      <ref bean="org.hisp.dhis.dataset.DataSetService" />
+    </property>
+  </bean>
 
 
   <!-- JAX-RS resources -->

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/resources/org/hisp/dhis/mobile/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/resources/org/hisp/dhis/mobile/i18n_module.properties	2011-10-18 20:23:09 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/resources/org/hisp/dhis/mobile/i18n_module.properties	2011-10-31 11:38:27 +0000
@@ -1,1 +1,14 @@
 patient_mobile_setting = Beneficiary Mobile Settings
+gender = Gender
+dob_type = DoB Type
+date_of_birth = Date of Birth
+blood_group = Blood Group
+registration_date = Registration Date
+available_patient_attributes = Available Patient Attributes
+filter = Filter
+selected_patient_attributes = Selected Patient Attributes
+
+intro_mobile_dataset = Define and sort the data sets which are available for facility reporting on the mobile client.
+mobile_dataset = Dataset for Mobile
+available_for_mobile_reporting = Available for Mobile Reporting
+available_datasets = Available DataSets
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/resources/struts.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/resources/struts.xml	2011-10-18 20:23:09 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/resources/struts.xml	2011-10-31 11:38:27 +0000
@@ -41,6 +41,18 @@
     <action name="editPatientMobileSetting" class="org.hisp.dhis.mobile.action.UpdateMobileSettingAction">
       <result name="success" type="redirect">patientMobileSetting.action</result>
     </action>
+	  
+	  	<!-- Mobile Dataset Action -->
+
+    <action name="showMobileDataSet" class="org.hisp.dhis.mobile.action.MobileDataSetListAction">
+      <result name="success" type="velocity">/main.vm</result>
+      <param name="page">/dhis-web-maintenance-mobile/mobileDatasetList.vm</param>
+      <param name="menu">/dhis-web-maintenance-mobile/menu.vm</param>
+    </action>
+
+    <action name="updateMobileDataset" class="org.hisp.dhis.mobile.action.UpdateMobileDataSetAction">
+      <result name="success" type="redirect">showMobileDataSet.action</result>
+    </action>
 
 
   </package>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/webapp/dhis-web-maintenance-mobile/menu.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/webapp/dhis-web-maintenance-mobile/menu.vm	2011-10-18 20:23:09 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/webapp/dhis-web-maintenance-mobile/menu.vm	2011-10-31 11:38:27 +0000
@@ -3,4 +3,5 @@
 <!--    <li><a href = "sendSMS.action">Send SMS</a></li>
     <li><a href = "mobileSettings.action">Settings</a></li>-->
 	<li><a href="patientMobileSetting.action">$i18n.getString( "patient_mobile_setting" )</a></li>
+	<li><a href="showMobileDataSet.action">$i18n.getString( "mobile_dataset" )&nbsp;</a></li>
 </ul>
\ No newline at end of file

=== added file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/webapp/dhis-web-maintenance-mobile/mobileDatasetList.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/webapp/dhis-web-maintenance-mobile/mobileDatasetList.vm	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/webapp/dhis-web-maintenance-mobile/mobileDatasetList.vm	2011-10-31 11:38:27 +0000
@@ -0,0 +1,72 @@
+<script type="text/javascript">
+	jQuery(document).ready(	function(){
+		jQuery("#availableList").dhisAjaxSelect({
+			source: "../dhis-web-commons-ajax-json/getDataSets.action",
+			iterator: 'dataSets',
+			connectedTo: 'selectedList',
+			handler: function(item) {
+				var option = jQuery("<option />");
+				option.text( item.name + "-Version " + item.version );
+				option.attr( "value", item.id );
+
+				return option;
+			}
+		});
+		
+		jQuery("#save").bind("click", function(e) {
+			jQuery("#availableList").children().attr("selected", "selected");
+			jQuery("#selectedList").children().attr("selected", "selected");
+		});
+	});
+</script>
+
+<h3>$i18n.getString( "mobile_dataset" )</h3>
+<form id="updateMobileDataset" name="updateMobileDataset" action="updateMobileDataset.action" method="post">
+<table id="dataSetSelectionArea">
+    <col style="width: 450px"/>
+    <col/>
+    <col style="width: 450px"/>
+
+    <thead>
+      <tr>
+        <th>$i18n.getString( "available_datasets" )</th>
+		<th>$i18n.getString( "filter" )</th>
+        <th>$i18n.getString( "mobile_dataset" )</th>
+      </tr>
+    </thead>
+
+    <tbody>
+		<tr>
+		  <!---->
+		  <td>
+		  	<select id="availableList" name="availableList" multiple="multiple" style="height: 200px; width: 100%;"></select>          
+          </td>
+
+        <td style="text-align:center">
+        	<input type="button" value="&gt;" title="$i18n.getString( 'move_selected' )" style="width:50px" onclick="dhisAjaxSelect_moveAllSelected( 'availableList' );"/><br/>
+            <input type="button" value="&lt;" title="$i18n.getString( 'remove_selected' )" style="width:50px" onclick="dhisAjaxSelect_moveAllSelected( 'selectedList' );"/><br/>
+			<input type="button" value="&gt;&gt;" title="$i18n.getString('move_all')" style="width:50px" onclick="dhisAjaxSelect_moveAll( 'availableList' );"/><br/>
+			<input type="button" value="&lt;&lt;" title="$i18n.getString('remove_all')" style="width:50px" onclick="dhisAjaxSelect_moveAll( 'selectedList' );"/>
+        </td>
+
+        <td>
+          <select id="selectedList" name="selectedList" multiple="multiple" style="height: 200px; width: 100%; margin-top: 22px;">
+        	#foreach( $mobiledataset in $mobileDatasets )
+      			<option value="$mobiledataset.id">$encoder.htmlEncode( $mobiledataset.name )-Version $mobiledataset.version</option>
+    		#end
+          </select>
+        </td>
+
+        <td style="width:30px; text-align:center">
+            <a href="javascript:moveUpSelectedOption( 'selectedList' )"><img src="../images/move_up.png"/></a><br/><br/>
+            <a href="javascript:moveDownSelectedOption( 'selectedList' )"><img src="../images/move_down.png"/></a><br/><br/>
+        </td>
+		</tr>
+		<tr>
+        <td colspan="3">
+          <input id="save" type="submit" value="$i18n.getString( 'save' )" style="width:20em"/>
+        </td>
+      </tr>
+	</tbody>
+</table>
+</form>