dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #01905
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 613: Sorted MapViews in dashboard.
------------------------------------------------------------
revno: 613
committer: Lars Helge Oeverland larshelge@xxxxxxxxx
branch nick: trunk
timestamp: Sun 2009-09-06 16:40:58 +0200
message:
Sorted MapViews in dashboard.
modified:
dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/java/org/hisp/dhis/dashboard/provider/MapViewContentProvider.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-dashboard-integration/src/main/java/org/hisp/dhis/dashboard/provider/MapViewContentProvider.java'
--- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/java/org/hisp/dhis/dashboard/provider/MapViewContentProvider.java 2009-06-17 22:06:54 +0000
+++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/java/org/hisp/dhis/dashboard/provider/MapViewContentProvider.java 2009-09-06 14:40:58 +0000
@@ -27,6 +27,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -34,6 +35,7 @@
import org.hisp.dhis.dashboard.DashboardContent;
import org.hisp.dhis.dashboard.DashboardService;
import org.hisp.dhis.mapping.MapView;
+import org.hisp.dhis.mapping.comparator.MapViewNameComparator;
import org.hisp.dhis.user.CurrentUserService;
import org.hisp.dhis.user.User;
@@ -85,6 +87,8 @@
List<MapView> mapViews = dashboardContent.getMapViews();
+ Collections.sort( mapViews, new MapViewNameComparator() );
+
content.put( key, mapViews );
}