dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #23229
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 11282: Light module, sorting of data sets
------------------------------------------------------------
revno: 11282
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2013-06-28 21:06:47 +0200
message:
Light module, sorting of data sets
modified:
dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/dataentry/action/GetDataSetsAction.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-light/src/main/java/org/hisp/dhis/light/dataentry/action/GetDataSetsAction.java'
--- dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/dataentry/action/GetDataSetsAction.java 2012-01-23 10:49:32 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/dataentry/action/GetDataSetsAction.java 2013-06-28 19:06:47 +0000
@@ -29,12 +29,14 @@
import com.opensymphony.xwork2.Action;
import org.apache.commons.lang.Validate;
+import org.hisp.dhis.common.comparator.IdentifiableObjectNameComparator;
import org.hisp.dhis.dataset.DataSet;
import org.hisp.dhis.light.utils.FormUtils;
import org.hisp.dhis.organisationunit.OrganisationUnit;
import org.hisp.dhis.organisationunit.OrganisationUnitService;
import java.util.ArrayList;
+import java.util.Collections;
import java.util.List;
/**
@@ -114,6 +116,8 @@
dataSets = formUtils.getDataSetsForCurrentUser( organisationUnitId );
+ Collections.sort( dataSets, IdentifiableObjectNameComparator.INSTANCE );
+
organisationUnit = organisationUnitService.getOrganisationUnit( organisationUnitId );
if ( dataSets.size() == 1 )