← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 13287: Data entry, replacing mergeWith call with copying certain properties for data set copy used for r...

 

------------------------------------------------------------
revno: 13287
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2013-12-17 20:50:35 +0100
message:
  Data entry, replacing mergeWith call with copying certain properties for data set copy used for rendering data sets without any sections as section forms. Caused tons of db requests when org units and more were copied.
modified:
  dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/LoadFormAction.java


--
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-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/LoadFormAction.java'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/LoadFormAction.java	2013-12-17 19:18:45 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/LoadFormAction.java	2013-12-17 19:50:35 +0000
@@ -318,9 +318,12 @@
 
         if ( displayMode.equals( DataSet.TYPE_DEFAULT ) )
         {
-            DataSet newDataSet = new DataSet();
-            newDataSet.mergeWith( dataSet );
-            dataSet = newDataSet;
+            DataSet dataSetCopy = new DataSet();
+            dataSetCopy.setName( dataSet.getName() );
+            dataSetCopy.setShortName( dataSet.getShortName() );
+            dataSetCopy.setRenderAsTabs( dataSet.isRenderAsTabs() );
+            dataSetCopy.setRenderHorizontally( dataSet.isRenderHorizontally() );
+            dataSet = dataSetCopy;
 
             for ( int i = 0; i < orderedCategoryCombos.size(); i++ )
             {