← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 5765: Removed SortOrderManager and DisplayPropertyManager

 

------------------------------------------------------------
revno: 5765
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2012-01-20 11:38:11 +0100
message:
  Removed SortOrderManager and DisplayPropertyManager
removed:
  dhis-2/dhis-services/dhis-service-options/src/main/java/org/hisp/dhis/options/displayproperty/
  dhis-2/dhis-services/dhis-service-options/src/main/java/org/hisp/dhis/options/displayproperty/DefaultDisplayPropertyHandler.java
  dhis-2/dhis-services/dhis-service-options/src/main/java/org/hisp/dhis/options/displayproperty/DefaultDisplayPropertyManager.java
  dhis-2/dhis-services/dhis-service-options/src/main/java/org/hisp/dhis/options/displayproperty/DisplayPropertyHandler.java
  dhis-2/dhis-services/dhis-service-options/src/main/java/org/hisp/dhis/options/displayproperty/DisplayPropertyManager.java
  dhis-2/dhis-services/dhis-service-options/src/main/java/org/hisp/dhis/options/sortorder/
  dhis-2/dhis-services/dhis-service-options/src/main/java/org/hisp/dhis/options/sortorder/DefaultSortOrderManager.java
  dhis-2/dhis-services/dhis-service-options/src/main/java/org/hisp/dhis/options/sortorder/SortOrderManager.java
  dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/interceptor/DisplayPropertyInterceptor.java
  dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/interceptor/SortOrderInterceptor.java
modified:
  dhis-2/dhis-services/dhis-service-options/src/main/resources/META-INF/dhis/beans.xml
  dhis-2/dhis-web/dhis-web-api-mobile/src/main/java/org/hisp/dhis/api/mobile/controller/MobileClientController.java
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/webdomain/DataValueSets.java
  dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetDataElementsAction.java
  dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetDataElementsNotInGroupAction.java
  dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetIndicatorsAction.java
  dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetOrganisationUnitChildrenAction.java
  dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetOrganisationUnitsAction.java
  dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/security/action/LoginAction.java
  dhis-2/dhis-web/dhis-web-commons/src/main/resources/META-INF/dhis/beans.xml
  dhis-2/dhis-web/dhis-web-commons/src/main/resources/dhis-web-commons.xml
  dhis-2/dhis-web/dhis-web-datamart/src/main/java/org/hisp/dhis/datamart/action/GetOptionsAction.java
  dhis-2/dhis-web/dhis-web-importexport/src/main/java/org/hisp/dhis/importexport/action/exp/GetDataElementListAction.java
  dhis-2/dhis-web/dhis-web-importexport/src/main/java/org/hisp/dhis/importexport/action/exp/GetIndicatorListAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/datadictionary/GetDataDictionaryMembersAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelement/GetDataElementGroupMembersAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelement/GetDataElementListAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelement/GetDataElementListSortOrderAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelementgroup/GetDataElementGroupMembersAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelementgroup/ShowDataElementGroupEditorAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelementgroup/ShowUpdateDataElementGroupFormAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/indicator/GetIndicatorListAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/indicator/GetIndicatorListSortOrderAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/indicatorgroup/ShowIndicatorGroupEditorAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/indicatorgroup/ShowUpdateIndicatorGroupFormAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/DataElementListAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/DataElementListFilteredByDataSet.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/DataSetListAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/EditDataSetFormAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/GetDataSetAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/GetDataSetListSortOrderAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/dataentryform/GetSelectedDataElementsAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/dataentryform/SelectDataElementAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/dataentryform/ViewDataEntryFormAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/section/EditSectionAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/section/GetSectionAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/section/GetSectionOptionsAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/organisationunit/GetOrganisationUnitListAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/dataentryform/GetSelectedDataElementsAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/dataentryform/SelectDataElementAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/dataentryform/ViewDataEntryFormAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/user/GetGeneralSettingsAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/user/SetGeneralSettingsAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/resources/META-INF/dhis/beans.xml
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/SetupRoleAction.java
  dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetAllDataElementsAction.java
  dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetAllIndicatorsAction.java
  dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetDataElementsByDataElementGroupAction.java
  dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetIndicatorsByIndicatorGroupAction.java
  dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetOrganisationUnitChildrenAction.java
  dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetOrganisationUnitsAtLevelAction.java
  dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/tablecreator/action/GetTableOptionsAction.java
  dhis-2/dhis-web/dhis-web-validationrule/src/main/java/org/hisp/dhis/validationrule/action/GetFilteredDataElementsAction.java
  dhis-2/dhis-web/dhis-web-validationrule/src/main/java/org/hisp/dhis/validationrule/action/dataanalysis/ViewAnalysisFormAction.java
  dhis-2/dhis-web/dhis-web-visualizer/src/main/java/org/hisp/dhis/visualizer/action/GetOrganisationUnitChildrenAction.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
=== removed directory 'dhis-2/dhis-services/dhis-service-options/src/main/java/org/hisp/dhis/options/displayproperty'
=== removed file 'dhis-2/dhis-services/dhis-service-options/src/main/java/org/hisp/dhis/options/displayproperty/DefaultDisplayPropertyHandler.java'
--- dhis-2/dhis-services/dhis-service-options/src/main/java/org/hisp/dhis/options/displayproperty/DefaultDisplayPropertyHandler.java	2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-services/dhis-service-options/src/main/java/org/hisp/dhis/options/displayproperty/DefaultDisplayPropertyHandler.java	1970-01-01 00:00:00 +0000
@@ -1,89 +0,0 @@
-package org.hisp.dhis.options.displayproperty;
-
-/*
- * Copyright (c) 2004-2012, 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.List;
-
-import org.hisp.dhis.common.BaseNameableObject;
-import org.hisp.dhis.common.NameableObject;
-
-/**
- * @author Lars Helge Overland
- * @version $Id: DisplayPropertyHandler.java 6251 2008-11-10 14:37:05Z larshelg $
- */
-public class DefaultDisplayPropertyHandler
-    implements DisplayPropertyHandler
-{
-    private String displayProperty;
-
-    public DefaultDisplayPropertyHandler( String displayProperty )
-    {
-        this.displayProperty = displayProperty;
-    }
-
-    // -------------------------------------------------------------------------
-    // DisplayPropertyHandler implementation
-    // -------------------------------------------------------------------------
-
-    public List<? extends NameableObject> handle( List<? extends BaseNameableObject> list )
-    {
-        for ( BaseNameableObject object : list )
-        {
-            handle( object );
-        }
-        
-        return list;
-    }
-    
-    public NameableObject handle( BaseNameableObject object )
-    {
-        if ( displayProperty.equals( DisplayPropertyManager.DISPLAY_PROPERTY_SHORTNAME ) )
-        {
-            if ( object.getShortName() != null )
-            {
-                object.setName( object.getShortName() );
-            }
-        }        
-        else if ( displayProperty.equals( DisplayPropertyManager.DISPLAY_PROPERTY_CODE ) )
-        {
-            if ( object.getCode() != null )
-            {
-                object.setName( object.getCode() );
-            }
-        }        
-        else if ( displayProperty.equals( DisplayPropertyManager.DISPLAY_PROPERTY_ALTERNATIVENAME ) )
-        {
-            if ( object.getAlternativeName() != null )
-            {
-                object.setName( object.getAlternativeName() );
-            }
-        }
-        
-        return object;
-    }
-}

=== removed file 'dhis-2/dhis-services/dhis-service-options/src/main/java/org/hisp/dhis/options/displayproperty/DefaultDisplayPropertyManager.java'
--- dhis-2/dhis-services/dhis-service-options/src/main/java/org/hisp/dhis/options/displayproperty/DefaultDisplayPropertyManager.java	2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-services/dhis-service-options/src/main/java/org/hisp/dhis/options/displayproperty/DefaultDisplayPropertyManager.java	1970-01-01 00:00:00 +0000
@@ -1,87 +0,0 @@
-package org.hisp.dhis.options.displayproperty;
-
-/*
- * Copyright (c) 2004-2012, 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.List;
-
-import org.hisp.dhis.user.UserSettingService;
-
-/**
- * @author Lars Helge Overland
- * @version $Id: DefaultDisplayPropertyManager.java 6256 2008-11-10 17:10:30Z larshelg $
- */
-public class DefaultDisplayPropertyManager
-    implements DisplayPropertyManager
-{
-    private final static String SETTING_NAME_DISPLAY_PROPERTY = "currentDisplayProperty";
-
-    // -------------------------------------------------------------------------
-    // Dependencies
-    // -------------------------------------------------------------------------
-
-    private UserSettingService userSettingService;
-
-    public void setUserSettingService( UserSettingService userSettingService )
-    {
-        this.userSettingService = userSettingService;
-    }
-
-    // -------------------------------------------------------------------------
-    // DisplayPropertyManager implementation
-    // -------------------------------------------------------------------------
-
-    public void setCurrentDisplayProperty( String displayProperty )
-    {
-        userSettingService.saveUserSetting( SETTING_NAME_DISPLAY_PROPERTY, displayProperty );
-    }
-
-    public String getCurrentDisplayProperty()
-    {
-        return (String) userSettingService.getUserSetting( SETTING_NAME_DISPLAY_PROPERTY, DISPLAY_PROPERTY_NAME );
-    }
-
-    public DefaultDisplayPropertyHandler getDisplayPropertyHandler()
-    {
-        String displayProperty = getCurrentDisplayProperty();
-
-        return new DefaultDisplayPropertyHandler( displayProperty );
-    }
-
-    public List<String> getDisplayProperties()
-    {
-        List<String> list = new ArrayList<String>();
-
-        list.add( DISPLAY_PROPERTY_NAME );
-        list.add( DISPLAY_PROPERTY_SHORTNAME );
-        list.add( DISPLAY_PROPERTY_CODE );
-        list.add( DISPLAY_PROPERTY_ALTERNATIVENAME );
-
-        return list;
-    }
-}

=== removed file 'dhis-2/dhis-services/dhis-service-options/src/main/java/org/hisp/dhis/options/displayproperty/DisplayPropertyHandler.java'
--- dhis-2/dhis-services/dhis-service-options/src/main/java/org/hisp/dhis/options/displayproperty/DisplayPropertyHandler.java	2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-services/dhis-service-options/src/main/java/org/hisp/dhis/options/displayproperty/DisplayPropertyHandler.java	1970-01-01 00:00:00 +0000
@@ -1,44 +0,0 @@
-package org.hisp.dhis.options.displayproperty;
-
-/*
- * Copyright (c) 2004-2012, 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.List;
-
-import org.hisp.dhis.common.BaseNameableObject;
-import org.hisp.dhis.common.NameableObject;
-
-/**
- * @author Lars Helge Overland
- * @version $Id: DisplayPropertyHandler.java 6256 2008-11-10 17:10:30Z larshelg $
- */
-public interface DisplayPropertyHandler
-{
-    List<? extends NameableObject> handle( List<? extends BaseNameableObject> list );
-    
-    NameableObject handle( BaseNameableObject object );
-}

=== removed file 'dhis-2/dhis-services/dhis-service-options/src/main/java/org/hisp/dhis/options/displayproperty/DisplayPropertyManager.java'
--- dhis-2/dhis-services/dhis-service-options/src/main/java/org/hisp/dhis/options/displayproperty/DisplayPropertyManager.java	2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-services/dhis-service-options/src/main/java/org/hisp/dhis/options/displayproperty/DisplayPropertyManager.java	1970-01-01 00:00:00 +0000
@@ -1,55 +0,0 @@
-package org.hisp.dhis.options.displayproperty;
-
-/*
- * Copyright (c) 2004-2012, 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.List;
-
-/**
- * @author Lars Helge Overland
- * @version $Id: DisplayPropertyManager.java 6256 2008-11-10 17:10:30Z larshelg $
- */
-public interface DisplayPropertyManager
-{
-    static final String DISPLAY_PROPERTY_NAME = "name";
-    
-    static final String DISPLAY_PROPERTY_SHORTNAME = "shortname";
-    
-    static final String DISPLAY_PROPERTY_CODE = "code";
-    
-    static final String DISPLAY_PROPERTY_ALTERNATIVENAME = "alternativename";
-    
-    static final String NONE = "[ None ]";
-
-    void setCurrentDisplayProperty( String displayProperty );
-    
-    String getCurrentDisplayProperty();
-    
-    DefaultDisplayPropertyHandler getDisplayPropertyHandler();
-    
-    List<String> getDisplayProperties();
-}

=== removed directory 'dhis-2/dhis-services/dhis-service-options/src/main/java/org/hisp/dhis/options/sortorder'
=== removed file 'dhis-2/dhis-services/dhis-service-options/src/main/java/org/hisp/dhis/options/sortorder/DefaultSortOrderManager.java'
--- dhis-2/dhis-services/dhis-service-options/src/main/java/org/hisp/dhis/options/sortorder/DefaultSortOrderManager.java	2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-services/dhis-service-options/src/main/java/org/hisp/dhis/options/sortorder/DefaultSortOrderManager.java	1970-01-01 00:00:00 +0000
@@ -1,161 +0,0 @@
-package org.hisp.dhis.options.sortorder;
-
-/*
- * Copyright (c) 2004-2012, 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.Comparator;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.hisp.dhis.dataelement.DataElement;
-import org.hisp.dhis.dataelement.comparator.DataElementAlternativeNameComparator;
-import org.hisp.dhis.dataelement.comparator.DataElementCodeComparator;
-import org.hisp.dhis.dataelement.comparator.DataElementNameComparator;
-import org.hisp.dhis.dataelement.comparator.DataElementShortNameComparator;
-import org.hisp.dhis.dataelement.comparator.DataElementSortOrderComparator;
-import org.hisp.dhis.dataset.DataSet;
-import org.hisp.dhis.dataset.comparator.DataSetCodeComparator;
-import org.hisp.dhis.dataset.comparator.DataSetNameComparator;
-import org.hisp.dhis.dataset.comparator.DataSetShortNameComparator;
-import org.hisp.dhis.dataset.comparator.DataSetSortOrderComparator;
-import org.hisp.dhis.indicator.Indicator;
-import org.hisp.dhis.indicator.comparator.IndicatorAlternativeNameComparator;
-import org.hisp.dhis.indicator.comparator.IndicatorCodeComparator;
-import org.hisp.dhis.indicator.comparator.IndicatorNameComparator;
-import org.hisp.dhis.indicator.comparator.IndicatorShortNameComparator;
-import org.hisp.dhis.indicator.comparator.IndicatorSortOrderComparator;
-import org.hisp.dhis.organisationunit.OrganisationUnit;
-import org.hisp.dhis.organisationunit.comparator.OrganisationUnitCodeComparator;
-import org.hisp.dhis.organisationunit.comparator.OrganisationUnitNameComparator;
-import org.hisp.dhis.organisationunit.comparator.OrganisationUnitShortNameComparator;
-import org.hisp.dhis.user.UserSettingService;
-
-/**
- * @author Lars Helge Overland
- * @version $Id: DefaultSortOrderManager.java 6256 2008-11-10 17:10:30Z larshelg $
- */
-public class DefaultSortOrderManager
-    implements SortOrderManager
-{
-    private final static String SETTING_NAME_SORT_ORDER = "currentSortOrder";
-
-    private Map<String, Comparator<DataElement>> dataElementComparators;
-    private Map<String, Comparator<Indicator>> indicatorComparators;
-    private Map<String, Comparator<OrganisationUnit>> organisationUnitComparators;
-    private Map<String, Comparator<DataSet>> dataSetComparators;
-    
-    public void init()
-    {
-        dataElementComparators = new HashMap<String, Comparator<DataElement>>();        
-        dataElementComparators.put( SORT_ORDER_NAME, new DataElementNameComparator() );
-        dataElementComparators.put( SORT_ORDER_SHORTNAME, new DataElementShortNameComparator() );
-        dataElementComparators.put( SORT_ORDER_ALTERNATIVENAME, new DataElementAlternativeNameComparator() );
-        dataElementComparators.put( SORT_ORDER_CODE, new DataElementCodeComparator() );
-        dataElementComparators.put( SORT_ORDER_CUSTOM, new DataElementSortOrderComparator() );
-        
-        indicatorComparators = new HashMap<String, Comparator<Indicator>>();        
-        indicatorComparators.put( SORT_ORDER_NAME, new IndicatorNameComparator() );
-        indicatorComparators.put( SORT_ORDER_SHORTNAME, new IndicatorShortNameComparator() );
-        indicatorComparators.put( SORT_ORDER_ALTERNATIVENAME, new IndicatorAlternativeNameComparator() );
-        indicatorComparators.put( SORT_ORDER_CODE, new IndicatorCodeComparator() );
-        indicatorComparators.put( SORT_ORDER_CUSTOM, new IndicatorSortOrderComparator() );
-        
-        organisationUnitComparators = new HashMap<String, Comparator<OrganisationUnit>>();        
-        organisationUnitComparators.put( SORT_ORDER_NAME, new OrganisationUnitNameComparator() );
-        organisationUnitComparators.put( SORT_ORDER_SHORTNAME, new OrganisationUnitShortNameComparator() );
-        organisationUnitComparators.put( SORT_ORDER_ALTERNATIVENAME, new OrganisationUnitNameComparator() ); // SIC
-        organisationUnitComparators.put( SORT_ORDER_CODE, new OrganisationUnitCodeComparator() );
-        organisationUnitComparators.put( SORT_ORDER_CUSTOM, new OrganisationUnitNameComparator() ); // SIC
-        
-        dataSetComparators = new HashMap<String, Comparator<DataSet>>();        
-        dataSetComparators.put( SORT_ORDER_NAME, new DataSetNameComparator() );
-        dataSetComparators.put( SORT_ORDER_SHORTNAME, new DataSetShortNameComparator() );
-        dataSetComparators.put( SORT_ORDER_ALTERNATIVENAME, new DataSetNameComparator() ); // SIC
-        dataSetComparators.put( SORT_ORDER_CODE, new DataSetCodeComparator() );
-        dataSetComparators.put( SORT_ORDER_CUSTOM, new DataSetSortOrderComparator() );
-    }
-    
-    // -------------------------------------------------------------------------
-    // Dependencies
-    // -------------------------------------------------------------------------
-    
-    private UserSettingService userSettingService;
-
-    public void setUserSettingService( UserSettingService userSettingService )
-    {
-        this.userSettingService = userSettingService;
-    }
-
-    // -------------------------------------------------------------------------
-    // SortOrderManager implementation
-    // -------------------------------------------------------------------------
-
-    public void setCurrentSortOrder( String sortOrder )
-    {
-        userSettingService.saveUserSetting( SETTING_NAME_SORT_ORDER, sortOrder );
-    }
-
-    public String getCurrentSortOrder()
-    {
-        return (String) userSettingService.getUserSetting( SETTING_NAME_SORT_ORDER, SORT_ORDER_NAME );
-    }
-
-    public Comparator<DataElement> getCurrentDataElementSortOrderComparator()
-    {
-        return dataElementComparators.get( getCurrentSortOrder() );
-    }
-    
-    public Comparator<Indicator> getCurrentIndicatorSortOrderComparator()
-    {
-        return indicatorComparators.get( getCurrentSortOrder() );
-    }
-    
-    public Comparator<OrganisationUnit> getCurrentOrganisationUnitSortOrderComparator()
-    {
-        return organisationUnitComparators.get( getCurrentSortOrder() );
-    }
-    
-    public Comparator<DataSet> getCurrentDataSetSortOrderComparator()
-    {
-        return dataSetComparators.get( getCurrentSortOrder() );
-    }
-
-    public List<String> getSortOrders()
-    {
-        List<String> list = new ArrayList<String>();
-
-        list.add( SORT_ORDER_NAME );
-        list.add( SORT_ORDER_SHORTNAME );
-        list.add( SORT_ORDER_ALTERNATIVENAME );
-        list.add( SORT_ORDER_CODE );
-        list.add( SORT_ORDER_CUSTOM );
-
-        return list;
-    }
-}

=== removed file 'dhis-2/dhis-services/dhis-service-options/src/main/java/org/hisp/dhis/options/sortorder/SortOrderManager.java'
--- dhis-2/dhis-services/dhis-service-options/src/main/java/org/hisp/dhis/options/sortorder/SortOrderManager.java	2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-services/dhis-service-options/src/main/java/org/hisp/dhis/options/sortorder/SortOrderManager.java	1970-01-01 00:00:00 +0000
@@ -1,63 +0,0 @@
-package org.hisp.dhis.options.sortorder;
-
-/*
- * Copyright (c) 2004-2012, 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.Comparator;
-import java.util.List;
-
-import org.hisp.dhis.dataelement.DataElement;
-import org.hisp.dhis.dataset.DataSet;
-import org.hisp.dhis.indicator.Indicator;
-import org.hisp.dhis.organisationunit.OrganisationUnit;
-
-/**
- * @author Lars Helge Overland
- * @version $Id: SortOrderManager.java 6256 2008-11-10 17:10:30Z larshelg $
- */
-public interface SortOrderManager
-{
-    static final String SORT_ORDER_NAME = "name";    
-    static final String SORT_ORDER_SHORTNAME = "shortname";    
-    static final String SORT_ORDER_ALTERNATIVENAME = "alternativename";
-    static final String SORT_ORDER_CODE = "code";
-    static final String SORT_ORDER_CUSTOM = "custom";
-    
-    void setCurrentSortOrder( String sortOrder );
-    
-    String getCurrentSortOrder();
-    
-    Comparator<DataElement> getCurrentDataElementSortOrderComparator();
-    
-    Comparator<Indicator> getCurrentIndicatorSortOrderComparator();
-    
-    Comparator<OrganisationUnit> getCurrentOrganisationUnitSortOrderComparator();
-    
-    Comparator<DataSet> getCurrentDataSetSortOrderComparator();
-    
-    List<String> getSortOrders();
-}

=== modified file 'dhis-2/dhis-services/dhis-service-options/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-services/dhis-service-options/src/main/resources/META-INF/dhis/beans.xml	2012-01-05 20:39:23 +0000
+++ dhis-2/dhis-services/dhis-service-options/src/main/resources/META-INF/dhis/beans.xml	2012-01-20 10:38:11 +0000
@@ -3,15 +3,6 @@
   xsi:schemaLocation="
 http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd";>
 
-  <bean id="org.hisp.dhis.options.sortorder.SortOrderManager" class="org.hisp.dhis.options.sortorder.DefaultSortOrderManager"
-    init-method="init">
-    <property name="userSettingService" ref="org.hisp.dhis.user.UserSettingService" />
-  </bean>
-
-  <bean id="org.hisp.dhis.options.displayproperty.DisplayPropertyManager" class="org.hisp.dhis.options.displayproperty.DefaultDisplayPropertyManager">
-    <property name="userSettingService" ref="org.hisp.dhis.user.UserSettingService" />
-  </bean>
-
   <bean id="org.hisp.dhis.options.style.StyleManager" class="org.hisp.dhis.options.style.DefaultStyleManager">
     <property name="systemSettingManager" ref="org.hisp.dhis.options.SystemSettingManager" />
 	<property name="userSettingService" ref="org.hisp.dhis.user.UserSettingService" />

=== modified file 'dhis-2/dhis-web/dhis-web-api-mobile/src/main/java/org/hisp/dhis/api/mobile/controller/MobileClientController.java'
--- dhis-2/dhis-web/dhis-web-api-mobile/src/main/java/org/hisp/dhis/api/mobile/controller/MobileClientController.java	2012-01-13 07:41:16 +0000
+++ dhis-2/dhis-web/dhis-web-api-mobile/src/main/java/org/hisp/dhis/api/mobile/controller/MobileClientController.java	2012-01-20 10:38:11 +0000
@@ -9,7 +9,6 @@
 import org.hisp.dhis.api.mobile.NotAllowedException;
 import org.hisp.dhis.api.mobile.model.MobileOrgUnitLinks;
 import org.hisp.dhis.api.mobile.model.OrgUnits;
-import org.hisp.dhis.api.mobile.support.MediaTypes;
 import org.hisp.dhis.organisationunit.OrganisationUnit;
 import org.hisp.dhis.user.CurrentUserService;
 import org.hisp.dhis.user.User;

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/webdomain/DataValueSets.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/webdomain/DataValueSets.java	2012-01-11 09:02:20 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/webdomain/DataValueSets.java	2012-01-20 10:38:11 +0000
@@ -27,20 +27,15 @@
 
 package org.hisp.dhis.api.webdomain;
 
-import org.codehaus.jackson.annotate.JsonProperty;
-import org.codehaus.jackson.map.annotate.JsonSerialize;
-import org.hisp.dhis.common.BaseIdentifiableObject;
-import org.hisp.dhis.common.Dxf2Namespace;
-import org.hisp.dhis.common.adapter.DataElementXmlAdapter;
-import org.hisp.dhis.importexport.dxf2.model.DataValueSet;
+import java.util.ArrayList;
+import java.util.List;
 
 import javax.xml.bind.annotation.XmlAccessType;
 import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
-import java.util.ArrayList;
-import java.util.List;
+
+import org.hisp.dhis.common.Dxf2Namespace;
+import org.hisp.dhis.importexport.dxf2.model.DataValueSet;
 
 /**
  * @author Morten Olav Hansen <mortenoh@xxxxxxxxx>

=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetDataElementsAction.java'
--- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetDataElementsAction.java	2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetDataElementsAction.java	2012-01-20 10:38:11 +0000
@@ -29,9 +29,9 @@
 
 import java.util.ArrayList;
 import java.util.Collections;
-import java.util.Comparator;
 import java.util.List;
 
+import org.hisp.dhis.common.comparator.IdentifiableObjectNameComparator;
 import org.hisp.dhis.dataelement.DataElement;
 import org.hisp.dhis.dataelement.DataElementCategoryCombo;
 import org.hisp.dhis.dataelement.DataElementCategoryService;
@@ -39,7 +39,6 @@
 import org.hisp.dhis.dataelement.DataElementService;
 import org.hisp.dhis.dataset.DataSet;
 import org.hisp.dhis.dataset.DataSetService;
-import org.hisp.dhis.options.displayproperty.DisplayPropertyHandler;
 import org.hisp.dhis.paging.ActionPagingSupport;
 import org.hisp.dhis.period.PeriodService;
 import org.hisp.dhis.period.PeriodType;
@@ -88,28 +87,6 @@
     }
 
     // -------------------------------------------------------------------------
-    // Comparator
-    // -------------------------------------------------------------------------
-
-    private Comparator<DataElement> dataElementComparator;
-
-    public void setDataElementComparator( Comparator<DataElement> dataElementComparator )
-    {
-        this.dataElementComparator = dataElementComparator;
-    }
-
-    // -------------------------------------------------------------------------
-    // DisplayPropertyHandler
-    // -------------------------------------------------------------------------
-
-    private DisplayPropertyHandler displayPropertyHandler;
-
-    public void setDisplayPropertyHandler( DisplayPropertyHandler displayPropertyHandler )
-    {
-        this.displayPropertyHandler = displayPropertyHandler;
-    }
-
-    // -------------------------------------------------------------------------
     // Input & output
     // -------------------------------------------------------------------------
 
@@ -233,7 +210,7 @@
             dataElements = IdentifiableObjectUtils.filterNameByKey( dataElements, key, true );
         }
 
-        Collections.sort( dataElements, dataElementComparator );
+        Collections.sort( dataElements, new IdentifiableObjectNameComparator() );
 
         if ( aggregate )
         {
@@ -247,8 +224,6 @@
             dataElements = dataElements.subList( paging.getStartPos(), paging.getEndPos() );
         }
 
-        displayPropertyHandler.handle( dataElements );
-
         return SUCCESS;
     }
 }

=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetDataElementsNotInGroupAction.java'
--- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetDataElementsNotInGroupAction.java	2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetDataElementsNotInGroupAction.java	2012-01-20 10:38:11 +0000
@@ -29,13 +29,12 @@
 
 import java.util.ArrayList;
 import java.util.Collections;
-import java.util.Comparator;
 import java.util.List;
 
+import org.hisp.dhis.common.comparator.IdentifiableObjectNameComparator;
 import org.hisp.dhis.dataelement.DataElement;
 import org.hisp.dhis.dataelement.DataElementGroup;
 import org.hisp.dhis.dataelement.DataElementService;
-import org.hisp.dhis.options.displayproperty.DisplayPropertyHandler;
 import org.hisp.dhis.paging.ActionPagingSupport;
 
 /**
@@ -56,28 +55,6 @@
     }
 
     // -------------------------------------------------------------------------
-    // Comparator
-    // -------------------------------------------------------------------------
-
-    private Comparator<DataElement> dataElementComparator;
-
-    public void setDataElementComparator( Comparator<DataElement> dataElementComparator )
-    {
-        this.dataElementComparator = dataElementComparator;
-    }
-
-    // -------------------------------------------------------------------------
-    // DisplayPropertyHandler
-    // -------------------------------------------------------------------------
-
-    private DisplayPropertyHandler displayPropertyHandler;
-
-    public void setDisplayPropertyHandler( DisplayPropertyHandler displayPropertyHandler )
-    {
-        this.displayPropertyHandler = displayPropertyHandler;
-    }
-
-    // -------------------------------------------------------------------------
     // Input
     // -------------------------------------------------------------------------
 
@@ -122,9 +99,7 @@
 
             groupMembers = new ArrayList<DataElement>( group.getMembers() );
 
-            Collections.sort( groupMembers, dataElementComparator );
-
-            displayPropertyHandler.handle( groupMembers );
+            Collections.sort( groupMembers, new IdentifiableObjectNameComparator() );
         }
 
         // ---------------------------------------------------------------------
@@ -135,7 +110,7 @@
 
         dataElements.removeAll( groupMembers );
 
-        Collections.sort( dataElements, dataElementComparator );
+        Collections.sort( dataElements, new IdentifiableObjectNameComparator() );
 
         if ( usePaging )
         {
@@ -144,8 +119,6 @@
             dataElements = dataElements.subList( paging.getStartPos(), paging.getEndPos() );
         }
 
-        displayPropertyHandler.handle( dataElements );
-
         return SUCCESS;
     }
 }

=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetIndicatorsAction.java'
--- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetIndicatorsAction.java	2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetIndicatorsAction.java	2012-01-20 10:38:11 +0000
@@ -29,15 +29,14 @@
 
 import java.util.ArrayList;
 import java.util.Collections;
-import java.util.Comparator;
 import java.util.List;
 
+import org.hisp.dhis.common.comparator.IdentifiableObjectNameComparator;
 import org.hisp.dhis.dataset.DataSet;
 import org.hisp.dhis.dataset.DataSetService;
 import org.hisp.dhis.indicator.Indicator;
 import org.hisp.dhis.indicator.IndicatorGroup;
 import org.hisp.dhis.indicator.IndicatorService;
-import org.hisp.dhis.options.displayproperty.DisplayPropertyHandler;
 import org.hisp.dhis.paging.ActionPagingSupport;
 import org.hisp.dhis.system.util.IdentifiableObjectUtils;
 
@@ -68,28 +67,6 @@
     }
 
     // -------------------------------------------------------------------------
-    // Comparator
-    // -------------------------------------------------------------------------
-
-    private Comparator<Indicator> indicatorComparator;
-
-    public void setIndicatorComparator( Comparator<Indicator> indicatorComparator )
-    {
-        this.indicatorComparator = indicatorComparator;
-    }
-
-    // -------------------------------------------------------------------------
-    // DisplayPropertyHandler
-    // -------------------------------------------------------------------------
-
-    private DisplayPropertyHandler displayPropertyHandler;
-
-    public void setDisplayPropertyHandler( DisplayPropertyHandler displayPropertyHandler )
-    {
-        this.displayPropertyHandler = displayPropertyHandler;
-    }
-
-    // -------------------------------------------------------------------------
     // Input & output
     // -------------------------------------------------------------------------
 
@@ -161,7 +138,7 @@
             indicators = IdentifiableObjectUtils.filterNameByKey( indicators, key, true );
         }
 
-        Collections.sort( indicators, indicatorComparator );
+        Collections.sort( indicators, new IdentifiableObjectNameComparator() );
 
         if ( usePaging )
         {
@@ -170,8 +147,6 @@
             indicators = indicators.subList( paging.getStartPos(), paging.getEndPos() );
         }
 
-        displayPropertyHandler.handle( indicators );
-
         return SUCCESS;
     }
 }

=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetOrganisationUnitChildrenAction.java'
--- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetOrganisationUnitChildrenAction.java	2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetOrganisationUnitChildrenAction.java	2012-01-20 10:38:11 +0000
@@ -29,10 +29,9 @@
 
 import java.util.ArrayList;
 import java.util.Collections;
-import java.util.Comparator;
 import java.util.List;
 
-import org.hisp.dhis.options.displayproperty.DisplayPropertyHandler;
+import org.hisp.dhis.common.comparator.IdentifiableObjectNameComparator;
 import org.hisp.dhis.organisationunit.OrganisationUnit;
 import org.hisp.dhis.organisationunit.OrganisationUnitService;
 import org.hisp.dhis.paging.ActionPagingSupport;
@@ -55,28 +54,6 @@
     }
 
     // -------------------------------------------------------------------------
-    // DisplayPropertyHandler
-    // -------------------------------------------------------------------------
-
-    private DisplayPropertyHandler displayPropertyHandler;
-
-    public void setDisplayPropertyHandler( DisplayPropertyHandler displayPropertyHandler )
-    {
-        this.displayPropertyHandler = displayPropertyHandler;
-    }
-
-    // -------------------------------------------------------------------------
-    // Comparator
-    // -------------------------------------------------------------------------
-
-    private Comparator<OrganisationUnit> organisationUnitComparator;
-
-    public void setOrganisationUnitComparator( Comparator<OrganisationUnit> organisationUnitComparator )
-    {
-        this.organisationUnitComparator = organisationUnitComparator;
-    }
-
-    // -------------------------------------------------------------------------
     // Input
     // -------------------------------------------------------------------------
 
@@ -109,7 +86,7 @@
 
         organisationUnits = new ArrayList<OrganisationUnit>( unit.getChildren() );
 
-        Collections.sort( organisationUnits, organisationUnitComparator );
+        Collections.sort( organisationUnits, new IdentifiableObjectNameComparator() );
 
         if ( usePaging )
         {
@@ -118,8 +95,6 @@
             organisationUnits = organisationUnits.subList( paging.getStartPos(), paging.getEndPos() );
         }
 
-        displayPropertyHandler.handle( organisationUnits );
-
         return SUCCESS;
     }
 }

=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetOrganisationUnitsAction.java'
--- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetOrganisationUnitsAction.java	2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetOrganisationUnitsAction.java	2012-01-20 10:38:11 +0000
@@ -29,10 +29,9 @@
 
 import java.util.ArrayList;
 import java.util.Collections;
-import java.util.Comparator;
 import java.util.List;
 
-import org.hisp.dhis.options.displayproperty.DisplayPropertyHandler;
+import org.hisp.dhis.common.comparator.IdentifiableObjectNameComparator;
 import org.hisp.dhis.organisationunit.OrganisationUnit;
 import org.hisp.dhis.organisationunit.OrganisationUnitService;
 import org.hisp.dhis.paging.ActionPagingSupport;
@@ -57,28 +56,6 @@
     }
 
     // -------------------------------------------------------------------------
-    // DisplayPropertyHandler
-    // -------------------------------------------------------------------------
-
-    private DisplayPropertyHandler displayPropertyHandler;
-
-    public void setDisplayPropertyHandler( DisplayPropertyHandler displayPropertyHandler )
-    {
-        this.displayPropertyHandler = displayPropertyHandler;
-    }
-
-    // -------------------------------------------------------------------------
-    // Comparator
-    // -------------------------------------------------------------------------
-
-    private Comparator<OrganisationUnit> organisationUnitComparator;
-
-    public void setOrganisationUnitComparator( Comparator<OrganisationUnit> organisationUnitComparator )
-    {
-        this.organisationUnitComparator = organisationUnitComparator;
-    }
-
-    // -------------------------------------------------------------------------
     // Input
     // -------------------------------------------------------------------------
 
@@ -117,7 +94,7 @@
                 organisationUnitService.getOrganisationUnitsAtLevel( level ) );
         }
 
-        Collections.sort( organisationUnits, organisationUnitComparator );
+        Collections.sort( organisationUnits, new IdentifiableObjectNameComparator() );
 
         if ( usePaging )
         {
@@ -126,8 +103,6 @@
             organisationUnits = organisationUnits.subList( paging.getStartPos(), paging.getEndPos() );
         }
 
-        displayPropertyHandler.handle( organisationUnits );
-
         return SUCCESS;
     }
 }

=== removed file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/interceptor/DisplayPropertyInterceptor.java'
--- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/interceptor/DisplayPropertyInterceptor.java	2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/interceptor/DisplayPropertyInterceptor.java	1970-01-01 00:00:00 +0000
@@ -1,97 +0,0 @@
-package org.hisp.dhis.interceptor;
-
-/*
- * Copyright (c) 2004-2012, 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.Map;
-
-import ognl.NoSuchPropertyException;
-import ognl.Ognl;
-
-import org.hisp.dhis.options.displayproperty.DefaultDisplayPropertyHandler;
-import org.hisp.dhis.options.displayproperty.DisplayPropertyManager;
-
-import com.opensymphony.xwork2.Action;
-import com.opensymphony.xwork2.ActionInvocation;
-import com.opensymphony.xwork2.interceptor.Interceptor;
-
-/**
- * @author Lars Helge Overland
- * @version $Id: WebWorkDisplayPropertyInterceptor.java 6335 2008-11-20 11:11:26Z larshelg $
- */
-public class DisplayPropertyInterceptor
-    implements Interceptor
-{
-    /**
-     * Determines if a de-serialized file is compatible with this class.
-     */
-    private static final long serialVersionUID = -400429585902812175L;
-
-    private static final String KEY_DISPLAY_PROPERTY_HANDLER = "displayPropertyHandler";
-
-    // -------------------------------------------------------------------------
-    // Dependencies
-    // -------------------------------------------------------------------------
-
-    private DisplayPropertyManager displayPropertyManager;
-
-    public void setDisplayPropertyManager( DisplayPropertyManager displayPropertyManager )
-    {
-        this.displayPropertyManager = displayPropertyManager;
-    }
-
-    // -------------------------------------------------------------------------
-    // Interface implementation
-    // -------------------------------------------------------------------------
-
-    public void destroy()
-    {
-    }
-
-    public void init()
-    {
-    }
-
-    public String intercept( ActionInvocation actionInvocation )
-        throws Exception
-    {
-        DefaultDisplayPropertyHandler handler = displayPropertyManager.getDisplayPropertyHandler();
-
-        Action action = (Action) actionInvocation.getAction();
-        Map<?, ?> contextMap = actionInvocation.getInvocationContext().getContextMap();
-
-        try
-        {
-            Ognl.setValue( KEY_DISPLAY_PROPERTY_HANDLER, contextMap, action, handler );
-        }
-        catch ( NoSuchPropertyException e )
-        {
-        }
-
-        return actionInvocation.invoke();
-    }
-}

=== removed file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/interceptor/SortOrderInterceptor.java'
--- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/interceptor/SortOrderInterceptor.java	2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/interceptor/SortOrderInterceptor.java	1970-01-01 00:00:00 +0000
@@ -1,131 +0,0 @@
-package org.hisp.dhis.interceptor;
-
-/*
- * Copyright (c) 2004-2012, 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.Comparator;
-import java.util.Map;
-
-import ognl.NoSuchPropertyException;
-import ognl.Ognl;
-
-import org.hisp.dhis.dataelement.DataElement;
-import org.hisp.dhis.dataset.DataSet;
-import org.hisp.dhis.indicator.Indicator;
-import org.hisp.dhis.options.sortorder.SortOrderManager;
-import org.hisp.dhis.organisationunit.OrganisationUnit;
-
-import com.opensymphony.xwork2.Action;
-import com.opensymphony.xwork2.ActionInvocation;
-import com.opensymphony.xwork2.interceptor.Interceptor;
-
-/**
- * @author Lars Helge Overland
- * @version $Id: WebWorkSortOrderInterceptor.java 6335 2008-11-20 11:11:26Z larshelg $
- */
-public class SortOrderInterceptor
-    implements Interceptor
-{
-    /**
-     * Determines if a de-serialized file is compatible with this class.
-     */
-    private static final long serialVersionUID = -2581250719044309788L;
-
-    private static final String KEY_DATAELEMENT_COMPARATOR = "dataElementComparator";
-    private static final String KEY_INDICATOR_COMPARATOR = "indicatorComparator";    
-    private static final String KEY_ORGANISATIONUNIT_COMPARATOR = "organisationUnitComparator";
-    private static final String KEY_DATASET_COMPARATOR = "dataSetComparator";
-
-    // -------------------------------------------------------------------------
-    // Dependencies
-    // -------------------------------------------------------------------------
-
-    private SortOrderManager sortOrderManager;
-
-    public void setSortOrderManager( SortOrderManager sortOrderManager )
-    {
-        this.sortOrderManager = sortOrderManager;
-    }
-
-    // -------------------------------------------------------------------------
-    // Interface implementation
-    // -------------------------------------------------------------------------
-
-    public void destroy()
-    {
-    }
-
-    public void init()
-    {
-    }
-
-    public String intercept( ActionInvocation actionInvocation )
-        throws Exception
-    {
-        Comparator<DataElement> dataElementComparator = sortOrderManager.getCurrentDataElementSortOrderComparator();
-        Comparator<Indicator> indicatorComparator = sortOrderManager.getCurrentIndicatorSortOrderComparator();        
-        Comparator<OrganisationUnit> organisationUnitComparator = sortOrderManager.getCurrentOrganisationUnitSortOrderComparator();
-        Comparator<DataSet> dataSetComparator = sortOrderManager.getCurrentDataSetSortOrderComparator();        
-        
-        Action action = (Action) actionInvocation.getAction();
-        Map<?, ?> contextMap = actionInvocation.getInvocationContext().getContextMap();
-
-        try
-        {
-            Ognl.setValue( KEY_DATAELEMENT_COMPARATOR, contextMap, action, dataElementComparator );
-        }
-        catch ( NoSuchPropertyException e )
-        {
-        }
-                
-        try
-        {
-            Ognl.setValue( KEY_INDICATOR_COMPARATOR, contextMap, action, indicatorComparator );
-        }
-        catch ( NoSuchPropertyException e )
-        {
-        }
-
-        try
-        {
-            Ognl.setValue( KEY_ORGANISATIONUNIT_COMPARATOR, contextMap, action, organisationUnitComparator );
-        }
-        catch ( NoSuchPropertyException e )
-        {
-        }
-
-        try
-        {
-            Ognl.setValue( KEY_DATASET_COMPARATOR, contextMap, action, dataSetComparator );
-        }
-        catch ( NoSuchPropertyException e )
-        {
-        }
-
-        return actionInvocation.invoke();
-    }
-}

=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/security/action/LoginAction.java'
--- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/security/action/LoginAction.java	2012-01-13 10:16:31 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/security/action/LoginAction.java	2012-01-20 10:38:11 +0000
@@ -27,8 +27,6 @@
 
 package org.hisp.dhis.security.action;
 
-import javax.servlet.http.HttpServletRequest;
-
 import org.apache.struts2.ServletActionContext;
 import org.springframework.mobile.device.Device;
 import org.springframework.mobile.device.DeviceResolver;

=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-web/dhis-web-commons/src/main/resources/META-INF/dhis/beans.xml	2012-01-19 14:20:31 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/resources/META-INF/dhis/beans.xml	2012-01-20 10:38:11 +0000
@@ -559,10 +559,6 @@
 
   <!-- Interceptor -->
 
-  <bean id="org.hisp.dhis.interceptor.DisplayPropertyInterceptor" class="org.hisp.dhis.interceptor.DisplayPropertyInterceptor">
-    <property name="displayPropertyManager" ref="org.hisp.dhis.options.displayproperty.DisplayPropertyManager" />
-  </bean>
-
   <bean id="org.hisp.dhis.interceptor.ExceptionInterceptor" class="org.hisp.dhis.interceptor.ExceptionInterceptor">
     <property name="showStackTrace" value="true" />
     <property name="ignoredExceptions">
@@ -577,10 +573,6 @@
     <property name="localeManager" ref="org.hisp.dhis.i18n.locale.LocaleManager" />
   </bean>
 
-  <bean id="org.hisp.dhis.interceptor.SortOrderInterceptor" class="org.hisp.dhis.interceptor.SortOrderInterceptor">
-    <property name="sortOrderManager" ref="org.hisp.dhis.options.sortorder.SortOrderManager" />
-  </bean>
-
   <bean id="org.hisp.dhis.interceptor.SystemSettingInterceptor" class="org.hisp.dhis.interceptor.SystemSettingInterceptor">
     <property name="systemSettingManager" ref="org.hisp.dhis.options.SystemSettingManager" />
   </bean>

=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/resources/dhis-web-commons.xml'
--- dhis-2/dhis-web/dhis-web-commons/src/main/resources/dhis-web-commons.xml	2012-01-19 14:20:31 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/resources/dhis-web-commons.xml	2012-01-20 10:38:11 +0000
@@ -36,8 +36,6 @@
     <interceptors>
       <interceptor name="exceptionInterceptor" class="org.hisp.dhis.interceptor.ExceptionInterceptor" />
       <interceptor name="i18nInterceptor" class="org.hisp.dhis.interceptor.I18nInterceptor" />
-      <interceptor name="sortOrderInterceptor" class="org.hisp.dhis.interceptor.SortOrderInterceptor" />
-      <interceptor name="displayPropertyInterceptor" class="org.hisp.dhis.interceptor.DisplayPropertyInterceptor" />
       <interceptor name="systemSettingInterceptor" class="org.hisp.dhis.interceptor.SystemSettingInterceptor" />
       <interceptor name="userSettingInterceptor" class="org.hisp.dhis.interceptor.UserSettingInterceptor" />
       <interceptor name="contextInterceptor" class="org.hisp.dhis.interceptor.ContextInterceptor" />
@@ -58,8 +56,6 @@
         <!-- The securityInterceptor is put after the i18nInterceptor so that the access denied error pages can use internationalisation. -->
         <interceptor-ref name="securityInterceptor" />
         <interceptor-ref name="loginInterceptor" />
-        <interceptor-ref name="sortOrderInterceptor" />
-        <interceptor-ref name="displayPropertyInterceptor" />
         <interceptor-ref name="systemSettingInterceptor" />
         <interceptor-ref name="userSettingInterceptor" />
         <interceptor-ref name="contextInterceptor" />

=== modified file 'dhis-2/dhis-web/dhis-web-datamart/src/main/java/org/hisp/dhis/datamart/action/GetOptionsAction.java'
--- dhis-2/dhis-web/dhis-web-datamart/src/main/java/org/hisp/dhis/datamart/action/GetOptionsAction.java	2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-web/dhis-web-datamart/src/main/java/org/hisp/dhis/datamart/action/GetOptionsAction.java	2012-01-20 10:38:11 +0000
@@ -38,7 +38,6 @@
 import org.hisp.dhis.datamart.DataMartExport;
 import org.hisp.dhis.datamart.DataMartService;
 import org.hisp.dhis.indicator.Indicator;
-import org.hisp.dhis.options.displayproperty.DisplayPropertyHandler;
 import org.hisp.dhis.organisationunit.OrganisationUnit;
 import org.hisp.dhis.organisationunit.OrganisationUnitLevel;
 import org.hisp.dhis.organisationunit.OrganisationUnitService;
@@ -209,17 +208,6 @@
     {
         this.organisationUnitComparator = organisationUnitComparator;
     }
-    
-    // -------------------------------------------------------------------------
-    // DisplayPropertyHandler
-    // -------------------------------------------------------------------------
-
-    private DisplayPropertyHandler displayPropertyHandler;
-
-    public void setDisplayPropertyHandler( DisplayPropertyHandler displayPropertyHandler )
-    {
-        this.displayPropertyHandler = displayPropertyHandler;
-    }
 
     // -------------------------------------------------------------------------
     // Action implementation
@@ -259,7 +247,6 @@
             // -----------------------------------------------------------------
 
             selectedDataElements = new ArrayList<DataElement>( export.getDataElements() );
-            displayPropertyHandler.handle( selectedDataElements );
             Collections.sort( selectedDataElements, dataElementComparator );
             
             // ---------------------------------------------------------------------
@@ -267,7 +254,6 @@
             // ---------------------------------------------------------------------
 
             selectedIndicators = new ArrayList<Indicator>( export.getIndicators() );
-            displayPropertyHandler.handle( selectedIndicators );
             Collections.sort( selectedIndicators, indicatorComparator );
             
             // ---------------------------------------------------------------------
@@ -275,7 +261,6 @@
             // ---------------------------------------------------------------------
 
             selectedOrganisationUnits = new ArrayList<OrganisationUnit>( export.getOrganisationUnits() );
-            displayPropertyHandler.handle( selectedOrganisationUnits );
             Collections.sort( selectedOrganisationUnits, organisationUnitComparator );
             
             // ---------------------------------------------------------------------

=== modified file 'dhis-2/dhis-web/dhis-web-importexport/src/main/java/org/hisp/dhis/importexport/action/exp/GetDataElementListAction.java'
--- dhis-2/dhis-web/dhis-web-importexport/src/main/java/org/hisp/dhis/importexport/action/exp/GetDataElementListAction.java	2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-web/dhis-web-importexport/src/main/java/org/hisp/dhis/importexport/action/exp/GetDataElementListAction.java	2012-01-20 10:38:11 +0000
@@ -30,16 +30,15 @@
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
-import java.util.Comparator;
 import java.util.List;
 
 import org.apache.commons.collections.CollectionUtils;
+import org.hisp.dhis.common.comparator.IdentifiableObjectNameComparator;
 import org.hisp.dhis.datadictionary.DataDictionary;
 import org.hisp.dhis.datadictionary.DataDictionaryService;
 import org.hisp.dhis.dataelement.DataElement;
 import org.hisp.dhis.dataelement.DataElementGroup;
 import org.hisp.dhis.dataelement.DataElementService;
-import org.hisp.dhis.options.displayproperty.DisplayPropertyHandler;
 
 import com.opensymphony.xwork2.Action;
 
@@ -70,28 +69,6 @@
     }
 
     // -------------------------------------------------------------------------
-    // Comparator
-    // -------------------------------------------------------------------------
-
-    private Comparator<DataElement> dataElementComparator;
-
-    public void setDataElementComparator( Comparator<DataElement> dataElementComparator )
-    {
-        this.dataElementComparator = dataElementComparator;
-    }
-
-    // -------------------------------------------------------------------------
-    // DisplayPropertyHandler
-    // -------------------------------------------------------------------------
-
-    private DisplayPropertyHandler displayPropertyHandler;
-
-    public void setDisplayPropertyHandler( DisplayPropertyHandler displayPropertyHandler )
-    {
-        this.displayPropertyHandler = displayPropertyHandler;
-    }
-
-    // -------------------------------------------------------------------------
     // Output
     // -------------------------------------------------------------------------
 
@@ -172,9 +149,7 @@
             dataElements = new ArrayList<DataElement>( dataElementService.getAllDataElements() );
         }
 
-        Collections.sort( dataElements, dataElementComparator );
-
-        displayPropertyHandler.handle( dataElements );
+        Collections.sort( dataElements, new IdentifiableObjectNameComparator() );
 
         return SUCCESS;
     }

=== modified file 'dhis-2/dhis-web/dhis-web-importexport/src/main/java/org/hisp/dhis/importexport/action/exp/GetIndicatorListAction.java'
--- dhis-2/dhis-web/dhis-web-importexport/src/main/java/org/hisp/dhis/importexport/action/exp/GetIndicatorListAction.java	2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-web/dhis-web-importexport/src/main/java/org/hisp/dhis/importexport/action/exp/GetIndicatorListAction.java	2012-01-20 10:38:11 +0000
@@ -30,14 +30,13 @@
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
-import java.util.Comparator;
 import java.util.List;
 
 import org.apache.commons.collections.CollectionUtils;
+import org.hisp.dhis.common.comparator.IdentifiableObjectNameComparator;
 import org.hisp.dhis.datadictionary.DataDictionaryService;
 import org.hisp.dhis.indicator.Indicator;
 import org.hisp.dhis.indicator.IndicatorService;
-import org.hisp.dhis.options.displayproperty.DisplayPropertyHandler;
 
 import com.opensymphony.xwork2.Action;
 
@@ -68,28 +67,6 @@
     }
 
     // -------------------------------------------------------------------------
-    // Comparator
-    // -------------------------------------------------------------------------
-
-    private Comparator<Indicator> indicatorComparator;
-
-    public void setIndicatorComparator( Comparator<Indicator> indicatorComparator )
-    {
-        this.indicatorComparator = indicatorComparator;
-    }
-
-    // -------------------------------------------------------------------------
-    // DisplayPropertyHandler
-    // -------------------------------------------------------------------------
-
-    private DisplayPropertyHandler displayPropertyHandler;
-
-    public void setDisplayPropertyHandler( DisplayPropertyHandler displayPropertyHandler )
-    {
-        this.displayPropertyHandler = displayPropertyHandler;
-    }
-
-    // -------------------------------------------------------------------------
     // Output
     // -------------------------------------------------------------------------
 
@@ -146,10 +123,8 @@
             indicators = new ArrayList<Indicator>( indicatorService.getAllIndicators() );
         }
         
-        Collections.sort( indicators, indicatorComparator );
+        Collections.sort( indicators, new IdentifiableObjectNameComparator() );
         
-        displayPropertyHandler.handle( indicators );
-
         return SUCCESS;
     }
 }

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/datadictionary/GetDataDictionaryMembersAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/datadictionary/GetDataDictionaryMembersAction.java	2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/datadictionary/GetDataDictionaryMembersAction.java	2012-01-20 10:38:11 +0000
@@ -29,14 +29,13 @@
 
 import java.util.ArrayList;
 import java.util.Collections;
-import java.util.Comparator;
 import java.util.List;
 
+import org.hisp.dhis.common.comparator.IdentifiableObjectNameComparator;
 import org.hisp.dhis.datadictionary.DataDictionary;
 import org.hisp.dhis.datadictionary.DataDictionaryService;
 import org.hisp.dhis.dataelement.DataElement;
 import org.hisp.dhis.indicator.Indicator;
-import org.hisp.dhis.options.displayproperty.DisplayPropertyHandler;
 
 import com.opensymphony.xwork2.Action;
 
@@ -58,35 +57,6 @@
     }    
 
     // -------------------------------------------------------------------------
-    // Comparator
-    // -------------------------------------------------------------------------
-
-    private Comparator<DataElement> dataElementComparator;
-
-    public void setDataElementComparator( Comparator<DataElement> dataElementComparator )
-    {
-        this.dataElementComparator = dataElementComparator;
-    }
-    
-    private Comparator<Indicator> indicatorComparator;
-
-    public void setIndicatorComparator( Comparator<Indicator> indicatorComparator )
-    {
-        this.indicatorComparator = indicatorComparator;
-    }
-
-    // -------------------------------------------------------------------------
-    // DisplayPropertyHandler
-    // -------------------------------------------------------------------------
-
-    private DisplayPropertyHandler displayPropertyHandler;
-
-    public void setDisplayPropertyHandler( DisplayPropertyHandler displayPropertyHandler )
-    {
-        this.displayPropertyHandler = displayPropertyHandler;
-    }    
-    
-    // -------------------------------------------------------------------------
     // Input
     // -------------------------------------------------------------------------
 
@@ -137,12 +107,10 @@
             dataDictionary = dataDictionaryService.getDataDictionary( id );
             
             selectedDataElements = new ArrayList<DataElement>( dataDictionary.getDataElements() );
-            Collections.sort( selectedDataElements, dataElementComparator );            
-            displayPropertyHandler.handle( selectedDataElements );
+            Collections.sort( selectedDataElements, new IdentifiableObjectNameComparator() );
             
             selectedIndicators = new ArrayList<Indicator>( dataDictionary.getIndicators() );            
-            Collections.sort( selectedIndicators, indicatorComparator );            
-            displayPropertyHandler.handle( selectedIndicators );
+            Collections.sort( selectedIndicators, new IdentifiableObjectNameComparator() );
         }
         
         return SUCCESS;

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelement/GetDataElementGroupMembersAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelement/GetDataElementGroupMembersAction.java	2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelement/GetDataElementGroupMembersAction.java	2012-01-20 10:38:11 +0000
@@ -29,17 +29,16 @@
 
 import java.util.ArrayList;
 import java.util.Collections;
-import java.util.Comparator;
 import java.util.List;
 import java.util.Set;
 
+import org.hisp.dhis.common.comparator.IdentifiableObjectNameComparator;
 import org.hisp.dhis.dataelement.DataElement;
 import org.hisp.dhis.dataelement.DataElementCategoryCombo;
 import org.hisp.dhis.dataelement.DataElementCategoryOptionCombo;
 import org.hisp.dhis.dataelement.DataElementGroup;
 import org.hisp.dhis.dataelement.DataElementOperand;
 import org.hisp.dhis.dataelement.DataElementService;
-import org.hisp.dhis.options.displayproperty.DisplayPropertyHandler;
 
 import com.opensymphony.xwork2.Action;
 
@@ -59,28 +58,6 @@
     public void setDataElementService( DataElementService dataElementService )
     {
         this.dataElementService = dataElementService;
-    }   
-
-    // -------------------------------------------------------------------------
-    // Comparator
-    // -------------------------------------------------------------------------
-
-    private Comparator<DataElement> dataElementComparator;
-
-    public void setDataElementComparator( Comparator<DataElement> dataElementComparator )
-    {
-        this.dataElementComparator = dataElementComparator;
-    }
-
-    // -------------------------------------------------------------------------
-    // DisplayPropertyHandler
-    // -------------------------------------------------------------------------
-
-    private DisplayPropertyHandler displayPropertyHandler;
-
-    public void setDisplayPropertyHandler( DisplayPropertyHandler displayPropertyHandler )
-    {
-        this.displayPropertyHandler = displayPropertyHandler;
     }
 
     // -------------------------------------------------------------------------
@@ -129,9 +106,7 @@
             dataElements = new ArrayList<DataElement>( dataElementService.getAllDataElements() );
         }
 
-        Collections.sort( dataElements, dataElementComparator );
-
-        displayPropertyHandler.handle( dataElements );
+        Collections.sort( dataElements, new IdentifiableObjectNameComparator() );
 
         for ( DataElement dataElement : dataElements )
         {

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelement/GetDataElementListAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelement/GetDataElementListAction.java	2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelement/GetDataElementListAction.java	2012-01-20 10:38:11 +0000
@@ -32,15 +32,14 @@
 
 import java.util.ArrayList;
 import java.util.Collections;
-import java.util.Comparator;
 import java.util.List;
 
+import org.hisp.dhis.common.comparator.IdentifiableObjectNameComparator;
 import org.hisp.dhis.datadictionary.DataDictionary;
 import org.hisp.dhis.datadictionary.DataDictionaryService;
 import org.hisp.dhis.datadictionary.comparator.DataDictionaryNameComparator;
 import org.hisp.dhis.dataelement.DataElement;
 import org.hisp.dhis.dataelement.DataElementService;
-import org.hisp.dhis.options.displayproperty.DisplayPropertyHandler;
 import org.hisp.dhis.paging.ActionPagingSupport;
 import org.hisp.dhis.user.UserSettingService;
 
@@ -76,28 +75,6 @@
     }
 
     // -------------------------------------------------------------------------
-    // Comparator
-    // -------------------------------------------------------------------------
-
-    private Comparator<DataElement> dataElementComparator;
-
-    public void setDataElementComparator( Comparator<DataElement> dataElementComparator )
-    {
-        this.dataElementComparator = dataElementComparator;
-    }
-
-    // -------------------------------------------------------------------------
-    // DisplayPropertyHandler
-    // -------------------------------------------------------------------------
-
-    private DisplayPropertyHandler displayPropertyHandler;
-
-    public void setDisplayPropertyHandler( DisplayPropertyHandler displayPropertyHandler )
-    {
-        this.displayPropertyHandler = displayPropertyHandler;
-    }
-
-    // -------------------------------------------------------------------------
     // Output
     // -------------------------------------------------------------------------
 
@@ -193,9 +170,7 @@
             dataElements = new ArrayList<DataElement>( dataElementService.getDataElementsBetween( paging.getStartPos(), paging.getPageSize() ) );
         }
 
-        Collections.sort( dataElements, dataElementComparator );
-
-        displayPropertyHandler.handle( dataElements );
+        Collections.sort( dataElements, new IdentifiableObjectNameComparator() );
 
         return SUCCESS;
     }

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelement/GetDataElementListSortOrderAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelement/GetDataElementListSortOrderAction.java	2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelement/GetDataElementListSortOrderAction.java	2012-01-20 10:38:11 +0000
@@ -34,7 +34,6 @@
 import org.hisp.dhis.dataelement.DataElement;
 import org.hisp.dhis.dataelement.DataElementService;
 import org.hisp.dhis.dataelement.comparator.DataElementSortOrderComparator;
-import org.hisp.dhis.options.displayproperty.DisplayPropertyHandler;
 
 import com.opensymphony.xwork2.Action;
 
@@ -57,17 +56,6 @@
     }
 
     // -------------------------------------------------------------------------
-    // DisplayPropertyHandler
-    // -------------------------------------------------------------------------
-
-    private DisplayPropertyHandler displayPropertyHandler;
-
-    public void setDisplayPropertyHandler( DisplayPropertyHandler displayPropertyHandler )
-    {
-        this.displayPropertyHandler = displayPropertyHandler;
-    }
-
-    // -------------------------------------------------------------------------
     // Output
     // -------------------------------------------------------------------------
 
@@ -88,8 +76,6 @@
 
         Collections.sort( dataElements, new DataElementSortOrderComparator() );
 
-        displayPropertyHandler.handle( dataElements );
-
         return SUCCESS;
     }
 }

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelementgroup/GetDataElementGroupMembersAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelementgroup/GetDataElementGroupMembersAction.java	2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelementgroup/GetDataElementGroupMembersAction.java	2012-01-20 10:38:11 +0000
@@ -29,13 +29,12 @@
 
 import java.util.ArrayList;
 import java.util.Collections;
-import java.util.Comparator;
 import java.util.List;
 
+import org.hisp.dhis.common.comparator.IdentifiableObjectNameComparator;
 import org.hisp.dhis.dataelement.DataElement;
 import org.hisp.dhis.dataelement.DataElementGroup;
 import org.hisp.dhis.dataelement.DataElementService;
-import org.hisp.dhis.options.displayproperty.DisplayPropertyHandler;
 
 import com.opensymphony.xwork2.Action;
 
@@ -57,28 +56,6 @@
     }
 
     // -------------------------------------------------------------------------
-    // Comparator
-    // -------------------------------------------------------------------------
-
-    private Comparator<DataElement> dataElementComparator;
-
-    public void setDataElementComparator( Comparator<DataElement> dataElementComparator )
-    {
-        this.dataElementComparator = dataElementComparator;
-    }
-
-    // -------------------------------------------------------------------------
-    // DisplayPropertyHandler
-    // -------------------------------------------------------------------------
-
-    private DisplayPropertyHandler displayPropertyHandler;
-
-    public void setDisplayPropertyHandler( DisplayPropertyHandler displayPropertyHandler )
-    {
-        this.displayPropertyHandler = displayPropertyHandler;
-    }
-
-    // -------------------------------------------------------------------------
     // Input
     // -------------------------------------------------------------------------
 
@@ -116,9 +93,7 @@
 
             groupMembers = new ArrayList<DataElement>( group.getMembers() );
 
-            Collections.sort( groupMembers, dataElementComparator );
-            
-            displayPropertyHandler.handle( groupMembers );
+            Collections.sort( groupMembers, new IdentifiableObjectNameComparator() );
         }
 
         return SUCCESS;

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelementgroup/ShowDataElementGroupEditorAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelementgroup/ShowDataElementGroupEditorAction.java	2011-05-30 08:58:59 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelementgroup/ShowDataElementGroupEditorAction.java	2012-01-20 10:38:11 +0000
@@ -29,13 +29,12 @@
 
 import java.util.ArrayList;
 import java.util.Collections;
-import java.util.Comparator;
 import java.util.List;
 
+import org.hisp.dhis.common.comparator.IdentifiableObjectNameComparator;
 import org.hisp.dhis.dataelement.DataElement;
 import org.hisp.dhis.dataelement.DataElementGroup;
 import org.hisp.dhis.dataelement.DataElementService;
-import org.hisp.dhis.options.displayproperty.DisplayPropertyHandler;
 
 import com.opensymphony.xwork2.Action;
 
@@ -59,17 +58,6 @@
     }
 
     // -------------------------------------------------------------------------
-    // Comparator
-    // -------------------------------------------------------------------------
-
-    private Comparator<DataElement> dataElementComparator;
-
-    public void setDataElementComparator( Comparator<DataElement> dataElementComparator )
-    {
-        this.dataElementComparator = dataElementComparator;
-    }
-
-    // -------------------------------------------------------------------------
     // Input & output
     // -------------------------------------------------------------------------
 
@@ -88,17 +76,6 @@
     }
 
     // -------------------------------------------------------------------------
-    // DisplayPropertyHandler
-    // -------------------------------------------------------------------------
-
-    private DisplayPropertyHandler displayPropertyHandler;
-
-    public void setDisplayPropertyHandler( DisplayPropertyHandler displayPropertyHandler )
-    {
-        this.displayPropertyHandler = displayPropertyHandler;
-    }
-
-    // -------------------------------------------------------------------------
     // Action implementation
     // -------------------------------------------------------------------------
 
@@ -108,8 +85,7 @@
         dataElementGroups = new ArrayList<DataElementGroup>( dataElementService.getAllDataElementGroups() );
 
         dataElements = new ArrayList<DataElement>( dataElementService.getAllDataElements() );
-        Collections.sort( dataElements, dataElementComparator );
-        displayPropertyHandler.handle( dataElements );
+        Collections.sort( dataElements, new IdentifiableObjectNameComparator() );
 
         return SUCCESS;
     }

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelementgroup/ShowUpdateDataElementGroupFormAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelementgroup/ShowUpdateDataElementGroupFormAction.java	2011-05-30 08:58:59 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelementgroup/ShowUpdateDataElementGroupFormAction.java	2012-01-20 10:38:11 +0000
@@ -29,13 +29,12 @@
 
 import java.util.ArrayList;
 import java.util.Collections;
-import java.util.Comparator;
 import java.util.List;
 
+import org.hisp.dhis.common.comparator.IdentifiableObjectNameComparator;
 import org.hisp.dhis.dataelement.DataElement;
 import org.hisp.dhis.dataelement.DataElementGroup;
 import org.hisp.dhis.dataelement.DataElementService;
-import org.hisp.dhis.options.displayproperty.DisplayPropertyHandler;
 
 import com.opensymphony.xwork2.Action;
 
@@ -59,28 +58,6 @@
     }
 
     // -------------------------------------------------------------------------
-    // Comparator
-    // -------------------------------------------------------------------------
-
-    private Comparator<DataElement> dataElementComparator;
-
-    public void setDataElementComparator( Comparator<DataElement> dataElementComparator )
-    {
-        this.dataElementComparator = dataElementComparator;
-    }
-
-    // -------------------------------------------------------------------------
-    // DisplayPropertyHandler
-    // -------------------------------------------------------------------------
-
-    private DisplayPropertyHandler displayPropertyHandler;
-
-    public void setDisplayPropertyHandler( DisplayPropertyHandler displayPropertyHandler )
-    {
-        this.displayPropertyHandler = displayPropertyHandler;
-    }
-
-    // -------------------------------------------------------------------------
     // Input
     // -------------------------------------------------------------------------
 
@@ -123,9 +100,7 @@
 
         groupMembers = new ArrayList<DataElement>( dataElementGroup.getMembers() );
 
-        Collections.sort( groupMembers, dataElementComparator );
-
-        displayPropertyHandler.handle( groupMembers );
+        Collections.sort( groupMembers, new IdentifiableObjectNameComparator() );
 
         return SUCCESS;
     }

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/indicator/GetIndicatorListAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/indicator/GetIndicatorListAction.java	2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/indicator/GetIndicatorListAction.java	2012-01-20 10:38:11 +0000
@@ -28,19 +28,18 @@
  */
 
 import static org.apache.commons.lang.StringUtils.isNotBlank;
-import static org.hisp.dhis.user.UserSettingService.*;
+import static org.hisp.dhis.user.UserSettingService.KEY_CURRENT_DATADICTIONARY;
 
 import java.util.ArrayList;
 import java.util.Collections;
-import java.util.Comparator;
 import java.util.List;
 
+import org.hisp.dhis.common.comparator.IdentifiableObjectNameComparator;
 import org.hisp.dhis.datadictionary.DataDictionary;
 import org.hisp.dhis.datadictionary.DataDictionaryService;
 import org.hisp.dhis.datadictionary.comparator.DataDictionaryNameComparator;
 import org.hisp.dhis.indicator.Indicator;
 import org.hisp.dhis.indicator.IndicatorService;
-import org.hisp.dhis.options.displayproperty.DisplayPropertyHandler;
 import org.hisp.dhis.paging.ActionPagingSupport;
 import org.hisp.dhis.user.UserSettingService;
 
@@ -78,28 +77,6 @@
     }
 
     // -------------------------------------------------------------------------
-    // Comparator
-    // -------------------------------------------------------------------------
-
-    private Comparator<Indicator> indicatorComparator;
-
-    public void setIndicatorComparator( Comparator<Indicator> indicatorComparator )
-    {
-        this.indicatorComparator = indicatorComparator;
-    }
-
-    // -------------------------------------------------------------------------
-    // DisplayPropertyHandler
-    // -------------------------------------------------------------------------
-
-    private DisplayPropertyHandler displayPropertyHandler;
-
-    public void setDisplayPropertyHandler( DisplayPropertyHandler displayPropertyHandler )
-    {
-        this.displayPropertyHandler = displayPropertyHandler;
-    }
-
-    // -------------------------------------------------------------------------
     // Output
     // -------------------------------------------------------------------------
 
@@ -195,9 +172,7 @@
             indicators = new ArrayList<Indicator>( indicatorService.getIndicatorsBetween( paging.getStartPos(), paging.getPageSize() ) );
         }
         
-        Collections.sort( indicators, indicatorComparator );
-
-        displayPropertyHandler.handle( indicators );
+        Collections.sort( indicators, new IdentifiableObjectNameComparator() );
 
         return SUCCESS;
     }

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/indicator/GetIndicatorListSortOrderAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/indicator/GetIndicatorListSortOrderAction.java	2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/indicator/GetIndicatorListSortOrderAction.java	2012-01-20 10:38:11 +0000
@@ -34,7 +34,6 @@
 import org.hisp.dhis.indicator.Indicator;
 import org.hisp.dhis.indicator.IndicatorService;
 import org.hisp.dhis.indicator.comparator.IndicatorSortOrderComparator;
-import org.hisp.dhis.options.displayproperty.DisplayPropertyHandler;
 
 import com.opensymphony.xwork2.Action;
 
@@ -57,17 +56,6 @@
     }
 
     // -------------------------------------------------------------------------
-    // DisplayPropertyHandler
-    // -------------------------------------------------------------------------
-
-    private DisplayPropertyHandler displayPropertyHandler;
-
-    public void setDisplayPropertyHandler( DisplayPropertyHandler displayPropertyHandler )
-    {
-        this.displayPropertyHandler = displayPropertyHandler;
-    }
-
-    // -------------------------------------------------------------------------
     // Output
     // -------------------------------------------------------------------------
 
@@ -88,8 +76,6 @@
         
         Collections.sort( indicators, new IndicatorSortOrderComparator() );
         
-        displayPropertyHandler.handle( indicators );
-        
         return SUCCESS;
     }
 }

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/indicatorgroup/ShowIndicatorGroupEditorAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/indicatorgroup/ShowIndicatorGroupEditorAction.java	2011-05-30 08:58:59 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/indicatorgroup/ShowIndicatorGroupEditorAction.java	2012-01-20 10:38:11 +0000
@@ -29,14 +29,13 @@
 
 import java.util.ArrayList;
 import java.util.Collections;
-import java.util.Comparator;
 import java.util.List;
 
+import org.hisp.dhis.common.comparator.IdentifiableObjectNameComparator;
 import org.hisp.dhis.indicator.Indicator;
 import org.hisp.dhis.indicator.IndicatorGroup;
 import org.hisp.dhis.indicator.IndicatorService;
 import org.hisp.dhis.indicator.comparator.IndicatorGroupNameComparator;
-import org.hisp.dhis.options.displayproperty.DisplayPropertyHandler;
 
 import com.opensymphony.xwork2.Action;
 
@@ -60,28 +59,6 @@
     }
 
     // -------------------------------------------------------------------------
-    // Comparator
-    // -------------------------------------------------------------------------
-
-    private Comparator<Indicator> indicatorComparator;
-
-    public void setIndicatorComparator( Comparator<Indicator> indicatorComparator )
-    {
-        this.indicatorComparator = indicatorComparator;
-    }
-
-    // -------------------------------------------------------------------------
-    // DisplayPropertyHandler
-    // -------------------------------------------------------------------------
-
-    private DisplayPropertyHandler displayPropertyHandler;
-
-    public void setDisplayPropertyHandler( DisplayPropertyHandler displayPropertyHandler )
-    {
-        this.displayPropertyHandler = displayPropertyHandler;
-    }
-
-    // -------------------------------------------------------------------------
     // Input & Output
     // -------------------------------------------------------------------------
    
@@ -110,12 +87,9 @@
         
         Collections.sort( indicatorGroups, new IndicatorGroupNameComparator() );
 
-        
         indicators = new ArrayList<Indicator>( indicatorService.getAllIndicators() );
         
-        Collections.sort( indicators, indicatorComparator );
-        
-        displayPropertyHandler.handle( indicators );
+        Collections.sort( indicators, new IdentifiableObjectNameComparator() );
         
         return SUCCESS;
     }

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/indicatorgroup/ShowUpdateIndicatorGroupFormAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/indicatorgroup/ShowUpdateIndicatorGroupFormAction.java	2011-05-30 08:58:59 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/indicatorgroup/ShowUpdateIndicatorGroupFormAction.java	2012-01-20 10:38:11 +0000
@@ -29,13 +29,12 @@
 
 import java.util.ArrayList;
 import java.util.Collections;
-import java.util.Comparator;
 import java.util.List;
 
+import org.hisp.dhis.common.comparator.IdentifiableObjectNameComparator;
 import org.hisp.dhis.indicator.Indicator;
 import org.hisp.dhis.indicator.IndicatorGroup;
 import org.hisp.dhis.indicator.IndicatorService;
-import org.hisp.dhis.options.displayproperty.DisplayPropertyHandler;
 
 import com.opensymphony.xwork2.Action;
 
@@ -59,28 +58,6 @@
     }
 
     // -------------------------------------------------------------------------
-    // Comparator
-    // -------------------------------------------------------------------------
-
-    private Comparator<Indicator> indicatorComparator;
-
-    public void setIndicatorComparator( Comparator<Indicator> indicatorComparator )
-    {
-        this.indicatorComparator = indicatorComparator;
-    }
-
-    // -------------------------------------------------------------------------
-    // DisplayPropertyHandler
-    // -------------------------------------------------------------------------
-
-    private DisplayPropertyHandler displayPropertyHandler;
-
-    public void setDisplayPropertyHandler( DisplayPropertyHandler displayPropertyHandler )
-    {
-        this.displayPropertyHandler = displayPropertyHandler;
-    }
-
-    // -------------------------------------------------------------------------
     // Input/output
     // -------------------------------------------------------------------------
 
@@ -115,9 +92,7 @@
 
         groupMembers = new ArrayList<Indicator>( indicatorGroup.getMembers() );
 
-        Collections.sort( groupMembers, indicatorComparator );
-
-        displayPropertyHandler.handle( groupMembers );
+        Collections.sort( groupMembers, new IdentifiableObjectNameComparator() );
 
         return SUCCESS;
     }

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/DataElementListAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/DataElementListAction.java	2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/DataElementListAction.java	2012-01-20 10:38:11 +0000
@@ -29,12 +29,11 @@
 
 import java.util.ArrayList;
 import java.util.Collections;
-import java.util.Comparator;
 import java.util.List;
 
+import org.hisp.dhis.common.comparator.IdentifiableObjectNameComparator;
 import org.hisp.dhis.dataelement.DataElement;
 import org.hisp.dhis.dataelement.DataElementService;
-import org.hisp.dhis.options.displayproperty.DisplayPropertyHandler;
 
 import com.opensymphony.xwork2.Action;
 
@@ -58,20 +57,6 @@
         this.dataElementService = dataElementService;
     }
 
-    private Comparator<DataElement> dataElementComparator;
-
-    public void setDataElementComparator( Comparator<DataElement> dataElementComparator )
-    {
-        this.dataElementComparator = dataElementComparator;
-    }
-
-    private DisplayPropertyHandler displayPropertyHandler;
-
-    public void setDisplayPropertyHandler( DisplayPropertyHandler displayPropertyHandler )
-    {
-        this.displayPropertyHandler = displayPropertyHandler;
-    }
-    
     // -------------------------------------------------------------------------
     // Getters & Setters
     // -------------------------------------------------------------------------
@@ -90,9 +75,7 @@
     {
         dataElements = new ArrayList<DataElement>( dataElementService.getAllActiveDataElements() );
 
-        Collections.sort( dataElements, dataElementComparator );
-
-        displayPropertyHandler.handle( dataElements );
+        Collections.sort( dataElements, new IdentifiableObjectNameComparator() );
 
         return SUCCESS;
     }

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/DataElementListFilteredByDataSet.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/DataElementListFilteredByDataSet.java	2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/DataElementListFilteredByDataSet.java	2012-01-20 10:38:11 +0000
@@ -29,14 +29,12 @@
 
 import java.util.ArrayList;
 import java.util.Collections;
-import java.util.Comparator;
 import java.util.List;
 
+import org.hisp.dhis.common.comparator.IdentifiableObjectNameComparator;
 import org.hisp.dhis.dataelement.DataElement;
-
 import org.hisp.dhis.dataset.DataSet;
 import org.hisp.dhis.dataset.DataSetService;
-import org.hisp.dhis.options.displayproperty.DisplayPropertyHandler;
 
 import com.opensymphony.xwork2.Action;
 
@@ -54,20 +52,6 @@
         this.dataSetService = dataSetService;
     }
 
-    private Comparator<DataElement> dataElementComparator;
-
-    public void setDataElementComparator( Comparator<DataElement> dataElementComparator )
-    {
-        this.dataElementComparator = dataElementComparator;
-    }
-
-    private DisplayPropertyHandler displayPropertyHandler;
-
-    public void setDisplayPropertyHandler( DisplayPropertyHandler displayPropertyHandler )
-    {
-        this.displayPropertyHandler = displayPropertyHandler;
-    }
-
     private Integer dataSetId;
 
     private List<DataElement> dataElements;
@@ -112,9 +96,7 @@
             
             dataElements = new ArrayList<DataElement>( dataSet.getDataElements() );
 
-            Collections.sort( dataElements, dataElementComparator );
-
-            displayPropertyHandler.handle( dataElements );
+            Collections.sort( dataElements, new IdentifiableObjectNameComparator() );
 
             return SUCCESS;
         }

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/DataSetListAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/DataSetListAction.java	2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/DataSetListAction.java	2012-01-20 10:38:11 +0000
@@ -31,12 +31,11 @@
 
 import java.util.ArrayList;
 import java.util.Collections;
-import java.util.Comparator;
 import java.util.List;
 
+import org.hisp.dhis.common.comparator.IdentifiableObjectNameComparator;
 import org.hisp.dhis.dataset.DataSet;
 import org.hisp.dhis.dataset.DataSetService;
-import org.hisp.dhis.options.displayproperty.DisplayPropertyHandler;
 import org.hisp.dhis.paging.ActionPagingSupport;
 
 /**
@@ -59,20 +58,6 @@
         this.dataSetService = dataSetService;
     }
 
-    private Comparator<DataSet> dataSetComparator;
-
-    public void setDataSetComparator( Comparator<DataSet> dataSetComparator )
-    {
-        this.dataSetComparator = dataSetComparator;
-    }
-
-    private DisplayPropertyHandler displayPropertyHandler;
-
-    public void setDisplayPropertyHandler( DisplayPropertyHandler displayPropertyHandler )
-    {
-        this.displayPropertyHandler = displayPropertyHandler;
-    }
-
     // -------------------------------------------------------------------------
     // Getters & Setters
     // -------------------------------------------------------------------------
@@ -120,9 +105,7 @@
                 .getPageSize() ) );
         }
 
-        Collections.sort( dataSets, dataSetComparator );
-
-        displayPropertyHandler.handle( dataSets );
+        Collections.sort( dataSets, new IdentifiableObjectNameComparator() );
 
         return SUCCESS;
     }

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/EditDataSetFormAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/EditDataSetFormAction.java	2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/EditDataSetFormAction.java	2012-01-20 10:38:11 +0000
@@ -29,14 +29,13 @@
 
 import java.util.ArrayList;
 import java.util.Collections;
-import java.util.Comparator;
 import java.util.List;
 
+import org.hisp.dhis.common.comparator.IdentifiableObjectNameComparator;
 import org.hisp.dhis.dataelement.DataElement;
 import org.hisp.dhis.dataset.DataSet;
 import org.hisp.dhis.dataset.DataSetService;
 import org.hisp.dhis.indicator.Indicator;
-import org.hisp.dhis.options.displayproperty.DisplayPropertyHandler;
 import org.hisp.dhis.period.PeriodService;
 import org.hisp.dhis.period.PeriodType;
 
@@ -66,27 +65,6 @@
         this.dataSetService = dataSetService;
     }
 
-    private Comparator<Indicator> indicatorComparator;
-
-    public void setIndicatorComparator( Comparator<Indicator> indicatorComparator )
-    {
-        this.indicatorComparator = indicatorComparator;
-    }
-
-    private Comparator<DataElement> dataElementComparator;
-
-    public void setDataElementComparator( Comparator<DataElement> dataElementComparator )
-    {
-        this.dataElementComparator = dataElementComparator;
-    }
-
-    private DisplayPropertyHandler displayPropertyHandler;
-
-    public void setDisplayPropertyHandler( DisplayPropertyHandler displayPropertyHandler )
-    {
-        this.displayPropertyHandler = displayPropertyHandler;
-    }
-
     // -------------------------------------------------------------------------
     // Input & output
     // -------------------------------------------------------------------------
@@ -147,11 +125,8 @@
             indicators = new ArrayList<Indicator>( dataSet.getIndicators() );
         }
 
-        Collections.sort( dataElements, dataElementComparator );
-        Collections.sort( indicators, indicatorComparator );
-
-        displayPropertyHandler.handle( dataElements );
-        displayPropertyHandler.handle( indicators );
+        Collections.sort( dataElements, new IdentifiableObjectNameComparator() );
+        Collections.sort( indicators, new IdentifiableObjectNameComparator() );
 
         return SUCCESS;
     }

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/GetDataSetAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/GetDataSetAction.java	2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/GetDataSetAction.java	2012-01-20 10:38:11 +0000
@@ -29,16 +29,15 @@
 
 import java.util.ArrayList;
 import java.util.Collections;
-import java.util.Comparator;
 import java.util.List;
 
+import org.hisp.dhis.common.comparator.IdentifiableObjectNameComparator;
 import org.hisp.dhis.dataelement.DataElement;
 import org.hisp.dhis.dataelement.DataElementCategoryCombo;
 import org.hisp.dhis.dataentryform.DataEntryForm;
 import org.hisp.dhis.dataset.DataSet;
 import org.hisp.dhis.dataset.DataSetService;
 import org.hisp.dhis.indicator.Indicator;
-import org.hisp.dhis.options.displayproperty.DisplayPropertyHandler;
 import org.hisp.dhis.oust.manager.SelectionTreeManager;
 
 import com.opensymphony.xwork2.Action;
@@ -61,27 +60,6 @@
         this.dataSetService = dataSetService;
     }
 
-    private DisplayPropertyHandler displayPropertyHandler;
-
-    public void setDisplayPropertyHandler( DisplayPropertyHandler displayPropertyHandler )
-    {
-        this.displayPropertyHandler = displayPropertyHandler;
-    }
-
-    private Comparator<DataElement> dataElementComparator;
-
-    public void setDataElementComparator( Comparator<DataElement> dataElementComparator )
-    {
-        this.dataElementComparator = dataElementComparator;
-    }
-
-    private Comparator<Indicator> indicatorComparator;
-
-    public void setIndicatorComparator( Comparator<Indicator> indicatorComparator )
-    {
-        this.indicatorComparator = indicatorComparator;
-    }
-
     private SelectionTreeManager selectionTreeManager;
 
     public void setSelectionTreeManager( SelectionTreeManager selectionTreeManager )
@@ -151,13 +129,11 @@
 
         dataSetDataElements = new ArrayList<DataElement>( dataSet.getDataElements() );
 
-        Collections.sort( dataSetDataElements, dataElementComparator );
+        Collections.sort( dataSetDataElements, new IdentifiableObjectNameComparator() );
 
         dataSetIndicators = new ArrayList<Indicator>( dataSet.getIndicators() );
 
-        Collections.sort( dataSetIndicators, indicatorComparator );
-
-        displayPropertyHandler.handle( dataSetDataElements );
+        Collections.sort( dataSetIndicators, new IdentifiableObjectNameComparator() );
 
         dataEntryForm = dataSet.getDataEntryForm();
 

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/GetDataSetListSortOrderAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/GetDataSetListSortOrderAction.java	2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/GetDataSetListSortOrderAction.java	2012-01-20 10:38:11 +0000
@@ -34,7 +34,6 @@
 import org.hisp.dhis.dataset.DataSet;
 import org.hisp.dhis.dataset.DataSetService;
 import org.hisp.dhis.dataset.comparator.DataSetSortOrderComparator;
-import org.hisp.dhis.options.displayproperty.DisplayPropertyHandler;
 
 import com.opensymphony.xwork2.Action;
 
@@ -57,18 +56,7 @@
     }
 
     // -------------------------------------------------------------------------
-    // DisplayPropertyHandler
-    // -------------------------------------------------------------------------
-
-    private DisplayPropertyHandler displayPropertyHandler;
-
-    public void setDisplayPropertyHandler( DisplayPropertyHandler displayPropertyHandler )
-    {
-        this.displayPropertyHandler = displayPropertyHandler;
-    }
-
-    // -------------------------------------------------------------------------
-    // DisplayPropertyHandler
+    // Output
     // -------------------------------------------------------------------------
 
     private List<DataSet> dataSets;
@@ -88,8 +76,6 @@
         
         Collections.sort( dataSets, new DataSetSortOrderComparator() );
 
-        displayPropertyHandler.handle( dataSets );
-        
         return SUCCESS;
     }
 }

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/dataentryform/GetSelectedDataElementsAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/dataentryform/GetSelectedDataElementsAction.java	2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/dataentryform/GetSelectedDataElementsAction.java	2012-01-20 10:38:11 +0000
@@ -29,13 +29,12 @@
 
 import java.util.ArrayList;
 import java.util.Collections;
-import java.util.Comparator;
 import java.util.List;
 
+import org.hisp.dhis.common.comparator.IdentifiableObjectNameComparator;
 import org.hisp.dhis.dataelement.DataElement;
 import org.hisp.dhis.dataset.DataSet;
 import org.hisp.dhis.dataset.DataSetService;
-import org.hisp.dhis.options.displayproperty.DisplayPropertyHandler;
 
 import com.opensymphony.xwork2.Action;
 
@@ -57,20 +56,6 @@
         this.dataSetService = dataSetService;
     }
     
-    private Comparator<DataElement> dataElementComparator;
-
-    public void setDataElementComparator( Comparator<DataElement> dataElementComparator )
-    {
-        this.dataElementComparator = dataElementComparator;
-    }
-
-    private DisplayPropertyHandler displayPropertyHandler;
-
-    public void setDisplayPropertyHandler( DisplayPropertyHandler displayPropertyHandler )
-    {
-        this.displayPropertyHandler = displayPropertyHandler;
-    }
-
     // -------------------------------------------------------------------------
     // Getters & Setters
     // -------------------------------------------------------------------------
@@ -100,10 +85,8 @@
 
         dataElementList = new ArrayList<DataElement>( dataSet.getDataElements() );
 
-        Collections.sort( dataElementList, dataElementComparator );
+        Collections.sort( dataElementList, new IdentifiableObjectNameComparator() );
         
-        displayPropertyHandler.handle( dataElementList );
-
         return SUCCESS;
     }
 }

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/dataentryform/SelectDataElementAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/dataentryform/SelectDataElementAction.java	2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/dataentryform/SelectDataElementAction.java	2012-01-20 10:38:11 +0000
@@ -29,13 +29,12 @@
 
 import java.util.ArrayList;
 import java.util.Collections;
-import java.util.Comparator;
 import java.util.List;
 
+import org.hisp.dhis.common.comparator.IdentifiableObjectNameComparator;
 import org.hisp.dhis.dataelement.DataElement;
 import org.hisp.dhis.dataset.DataSet;
 import org.hisp.dhis.dataset.DataSetService;
-import org.hisp.dhis.options.displayproperty.DisplayPropertyHandler;
 import org.hisp.dhis.system.filter.DataElementStringTypeFilter;
 import org.hisp.dhis.system.util.FilterUtils;
 
@@ -59,20 +58,6 @@
         this.dataSetService = dataSetService;
     }
 
-    private Comparator<DataElement> dataElementComparator;
-
-    public void setDataElementComparator( Comparator<DataElement> dataElementComparator )
-    {
-        this.dataElementComparator = dataElementComparator;
-    }
-
-    private DisplayPropertyHandler displayPropertyHandler;
-
-    public void setDisplayPropertyHandler( DisplayPropertyHandler displayPropertyHandler )
-    {
-        this.displayPropertyHandler = displayPropertyHandler;
-    }
-
     // -------------------------------------------------------------------------
     // Getters & Setters
     // -------------------------------------------------------------------------
@@ -130,9 +115,7 @@
                 FilterUtils.filter( dataElements, new DataElementStringTypeFilter() );
             }
             
-            Collections.sort( dataElements, dataElementComparator );
-
-            displayPropertyHandler.handle( dataElements );
+            Collections.sort( dataElements, new IdentifiableObjectNameComparator() );
         }
 
         return SUCCESS;

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/dataentryform/ViewDataEntryFormAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/dataentryform/ViewDataEntryFormAction.java	2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/dataentryform/ViewDataEntryFormAction.java	2012-01-20 10:38:11 +0000
@@ -29,16 +29,15 @@
 
 import java.util.ArrayList;
 import java.util.Collections;
-import java.util.Comparator;
 import java.util.List;
 
+import org.hisp.dhis.common.comparator.IdentifiableObjectNameComparator;
 import org.hisp.dhis.dataelement.DataElement;
 import org.hisp.dhis.dataentryform.DataEntryForm;
 import org.hisp.dhis.dataentryform.DataEntryFormService;
 import org.hisp.dhis.dataset.DataSet;
 import org.hisp.dhis.dataset.DataSetService;
 import org.hisp.dhis.i18n.I18n;
-import org.hisp.dhis.options.displayproperty.DisplayPropertyHandler;
 import org.hisp.dhis.user.UserSettingService;
 
 import com.opensymphony.xwork2.Action;
@@ -83,28 +82,6 @@
     }
 
     // -------------------------------------------------------------------------
-    // Comparator
-    // -------------------------------------------------------------------------
-
-    private Comparator<DataElement> dataElementComparator;
-
-    public void setDataElementComparator( Comparator<DataElement> dataElementComparator )
-    {
-        this.dataElementComparator = dataElementComparator;
-    }
-
-    // -------------------------------------------------------------------------
-    // DisplayPropertyHandler
-    // -------------------------------------------------------------------------
-
-    private DisplayPropertyHandler displayPropertyHandler;
-
-    public void setDisplayPropertyHandler( DisplayPropertyHandler displayPropertyHandler )
-    {
-        this.displayPropertyHandler = displayPropertyHandler;
-    }
-
-    // -------------------------------------------------------------------------
     // Getters & Setters
     // -------------------------------------------------------------------------
 
@@ -169,9 +146,7 @@
         
         dataElementList = new ArrayList<DataElement>( dataSet.getDataElements() );
 
-        Collections.sort( dataElementList, dataElementComparator );
-
-        displayPropertyHandler.handle( dataElementList );
+        Collections.sort( dataElementList, new IdentifiableObjectNameComparator() );
 
         return SUCCESS;
     }

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/section/EditSectionAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/section/EditSectionAction.java	2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/section/EditSectionAction.java	2012-01-20 10:38:11 +0000
@@ -30,10 +30,10 @@
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
-import java.util.Comparator;
 import java.util.Iterator;
 import java.util.List;
 
+import org.hisp.dhis.common.comparator.IdentifiableObjectNameComparator;
 import org.hisp.dhis.dataelement.DataElement;
 import org.hisp.dhis.dataelement.DataElementCategoryCombo;
 import org.hisp.dhis.dataelement.DataElementGroup;
@@ -42,7 +42,6 @@
 import org.hisp.dhis.dataset.DataSet;
 import org.hisp.dhis.dataset.Section;
 import org.hisp.dhis.dataset.SectionService;
-import org.hisp.dhis.options.displayproperty.DisplayPropertyHandler;
 
 import com.opensymphony.xwork2.Action;
 
@@ -68,28 +67,6 @@
     }
 
     // -------------------------------------------------------------------------
-    // Comparator
-    // -------------------------------------------------------------------------
-
-    private Comparator<DataElement> dataElementComparator;
-
-    public void setDataElementComparator( Comparator<DataElement> dataElementComparator )
-    {
-        this.dataElementComparator = dataElementComparator;
-    }
-
-    // -------------------------------------------------------------------------
-    // DisplayPropertyHandler
-    // -------------------------------------------------------------------------
-
-    private DisplayPropertyHandler displayPropertyHandler;
-
-    public void setDisplayPropertyHandler( DisplayPropertyHandler displayPropertyHandler )
-    {
-        this.displayPropertyHandler = displayPropertyHandler;
-    }
-
-    // -------------------------------------------------------------------------
     // Input
     // -------------------------------------------------------------------------
 
@@ -183,12 +160,10 @@
 
         dataElementGroups = new ArrayList<DataElementGroup>( dataElementService.getAllDataElementGroups() );
 
-        Collections.sort( dataElementOfDataSet, dataElementComparator );
+        Collections.sort( dataElementOfDataSet, new IdentifiableObjectNameComparator() );
 
         Collections.sort( dataElementGroups, new DataElementGroupNameComparator() );
 
-        displayPropertyHandler.handle( dataElementOfDataSet );
-        
         return SUCCESS;
     }
 }

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/section/GetSectionAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/section/GetSectionAction.java	2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/section/GetSectionAction.java	2012-01-20 10:38:11 +0000
@@ -29,14 +29,13 @@
 
 import java.util.ArrayList;
 import java.util.Collections;
-import java.util.Comparator;
 import java.util.List;
 
+import org.hisp.dhis.common.comparator.IdentifiableObjectNameComparator;
 import org.hisp.dhis.dataelement.DataElement;
 import org.hisp.dhis.dataelement.DataElementCategoryCombo;
 import org.hisp.dhis.dataset.Section;
 import org.hisp.dhis.dataset.SectionService;
-import org.hisp.dhis.options.displayproperty.DisplayPropertyHandler;
 
 import com.opensymphony.xwork2.Action;
 
@@ -54,20 +53,6 @@
         this.sectionService = sectionService;
     }
 
-    private DisplayPropertyHandler displayPropertyHandler;
-
-    public void setDisplayPropertyHandler( DisplayPropertyHandler displayPropertyHandler )
-    {
-        this.displayPropertyHandler = displayPropertyHandler;
-    }
-
-    private Comparator<DataElement> dataElementComparator;
-
-    public void setDataElementComparator( Comparator<DataElement> dataElementComparator )
-    {
-        this.dataElementComparator = dataElementComparator;
-    }
-
     // -------------------------------------------------------------------------
     // Input & output
     // -------------------------------------------------------------------------
@@ -123,9 +108,7 @@
 
         categoryCombo = section.getDataElements().iterator().next().getCategoryCombo();
 
-        Collections.sort( sectionDataElements, dataElementComparator );
-
-        displayPropertyHandler.handle( sectionDataElements );
+        Collections.sort( sectionDataElements, new IdentifiableObjectNameComparator() );
 
         return SUCCESS;
     }

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/section/GetSectionOptionsAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/section/GetSectionOptionsAction.java	2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/section/GetSectionOptionsAction.java	2012-01-20 10:38:11 +0000
@@ -29,17 +29,16 @@
 
 import java.util.ArrayList;
 import java.util.Collections;
-import java.util.Comparator;
 import java.util.Iterator;
 import java.util.List;
 
+import org.hisp.dhis.common.comparator.IdentifiableObjectNameComparator;
 import org.hisp.dhis.dataelement.DataElement;
 import org.hisp.dhis.dataelement.DataElementCategoryCombo;
 import org.hisp.dhis.dataelement.DataElementCategoryService;
 import org.hisp.dhis.dataset.DataSet;
 import org.hisp.dhis.dataset.DataSetService;
 import org.hisp.dhis.dataset.Section;
-import org.hisp.dhis.options.displayproperty.DisplayPropertyHandler;
 
 import com.opensymphony.xwork2.Action;
 
@@ -64,20 +63,6 @@
         this.dataSetService = dataSetService;
     }
 
-    private DisplayPropertyHandler displayPropertyHandler;
-
-    public void setDisplayPropertyHandler( DisplayPropertyHandler displayPropertyHandler )
-    {
-        this.displayPropertyHandler = displayPropertyHandler;
-    }
-
-    private Comparator<DataElement> dataElementComparator;
-
-    public void setDataElementComparator( Comparator<DataElement> dataElementComparator )
-    {
-        this.dataElementComparator = dataElementComparator;
-    }
-
     // -------------------------------------------------------------------------
     // Input
     // -------------------------------------------------------------------------
@@ -154,9 +139,7 @@
             }
         }
 
-        Collections.sort( dataElements, dataElementComparator );
-
-        displayPropertyHandler.handle( dataElements );
+        Collections.sort( dataElements, new IdentifiableObjectNameComparator() );
 
         return SUCCESS;
     }

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/organisationunit/GetOrganisationUnitListAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/organisationunit/GetOrganisationUnitListAction.java	2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/organisationunit/GetOrganisationUnitListAction.java	2012-01-20 10:38:11 +0000
@@ -32,10 +32,9 @@
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
-import java.util.Comparator;
 import java.util.List;
 
-import org.hisp.dhis.options.displayproperty.DisplayPropertyHandler;
+import org.hisp.dhis.common.comparator.IdentifiableObjectNameComparator;
 import org.hisp.dhis.organisationunit.OrganisationUnit;
 import org.hisp.dhis.organisationunit.OrganisationUnitService;
 import org.hisp.dhis.ouwt.manager.OrganisationUnitSelectionManager;
@@ -68,28 +67,6 @@
     }
 
     // -------------------------------------------------------------------------
-    // Comparator
-    // -------------------------------------------------------------------------
-
-    private Comparator<OrganisationUnit> organisationUnitComparator;
-
-    public void setOrganisationUnitComparator( Comparator<OrganisationUnit> organisationUnitComparator )
-    {
-        this.organisationUnitComparator = organisationUnitComparator;
-    }
-
-    // -------------------------------------------------------------------------
-    // DisplayPropertyHandler
-    // -------------------------------------------------------------------------
-
-    private DisplayPropertyHandler displayPropertyHandler;
-
-    public void setDisplayPropertyHandler( DisplayPropertyHandler displayPropertyHandler )
-    {
-        this.displayPropertyHandler = displayPropertyHandler;
-    }
-
-    // -------------------------------------------------------------------------
     // Input & Output
     // -------------------------------------------------------------------------
 
@@ -133,9 +110,7 @@
             }
         }
 
-        Collections.sort( organisationUnits, organisationUnitComparator );
-
-        displayPropertyHandler.handle( organisationUnits );
+        Collections.sort( organisationUnits, new IdentifiableObjectNameComparator() );
 
         if ( isNotBlank( key ) )
         {

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/dataentryform/GetSelectedDataElementsAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/dataentryform/GetSelectedDataElementsAction.java	2012-01-11 05:31:53 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/dataentryform/GetSelectedDataElementsAction.java	2012-01-20 10:38:11 +0000
@@ -29,11 +29,10 @@
 
 import java.util.ArrayList;
 import java.util.Collections;
-import java.util.Comparator;
 import java.util.List;
 
+import org.hisp.dhis.common.comparator.IdentifiableObjectNameComparator;
 import org.hisp.dhis.dataelement.DataElement;
-import org.hisp.dhis.options.displayproperty.DisplayPropertyHandler;
 import org.hisp.dhis.program.ProgramStage;
 import org.hisp.dhis.program.ProgramStageDataElementService;
 import org.hisp.dhis.program.ProgramStageService;
@@ -58,20 +57,6 @@
         this.programStageService = programStageService;
     }
 
-    private Comparator<DataElement> dataElementComparator;
-
-    public void setDataElementComparator( Comparator<DataElement> dataElementComparator )
-    {
-        this.dataElementComparator = dataElementComparator;
-    }
-
-    private DisplayPropertyHandler displayPropertyHandler;
-
-    public void setDisplayPropertyHandler( DisplayPropertyHandler displayPropertyHandler )
-    {
-        this.displayPropertyHandler = displayPropertyHandler;
-    }
-
     private ProgramStageDataElementService programStageDataElementService;
 
     public void setProgramStageDataElementService( ProgramStageDataElementService programStageDataElementService )
@@ -108,9 +93,7 @@
 
         dataElementList = new ArrayList<DataElement>( programStageDataElementService.getListDataElement( programStage ) );
 
-        Collections.sort( dataElementList, dataElementComparator );
-
-        displayPropertyHandler.handle( dataElementList );
+        Collections.sort( dataElementList, new IdentifiableObjectNameComparator() );
 
         return SUCCESS;
     }

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/dataentryform/SelectDataElementAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/dataentryform/SelectDataElementAction.java	2012-01-11 05:31:53 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/dataentryform/SelectDataElementAction.java	2012-01-20 10:38:11 +0000
@@ -30,11 +30,10 @@
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
-import java.util.Comparator;
 import java.util.List;
 
+import org.hisp.dhis.common.comparator.IdentifiableObjectNameComparator;
 import org.hisp.dhis.dataelement.DataElement;
-import org.hisp.dhis.options.displayproperty.DisplayPropertyHandler;
 import org.hisp.dhis.program.ProgramStage;
 import org.hisp.dhis.program.ProgramStageDataElementService;
 import org.hisp.dhis.program.ProgramStageService;
@@ -61,20 +60,6 @@
         this.programStageService = programStageService;
     }
 
-    private Comparator<DataElement> dataElementComparator;
-
-    public void setDataElementComparator( Comparator<DataElement> dataElementComparator )
-    {
-        this.dataElementComparator = dataElementComparator;
-    }
-
-    private DisplayPropertyHandler displayPropertyHandler;
-
-    public void setDisplayPropertyHandler( DisplayPropertyHandler displayPropertyHandler )
-    {
-        this.displayPropertyHandler = displayPropertyHandler;
-    }
-
     private ProgramStageDataElementService programStageDataElementService;
 
     public void setProgramStageDataElementService( ProgramStageDataElementService programStageDataElementService )
@@ -88,7 +73,8 @@
 
     private int associationId;
 
-    public void setAssociationId(int associationId) {
+    public void setAssociationId( int associationId ) 
+    {
         this.associationId = associationId;
     }
     
@@ -138,9 +124,7 @@
             	dataElements =  FilterUtils.filter( dataElements, new DataElementStringTypeFilter());
             }
             
-            Collections.sort( new ArrayList<DataElement>(dataElements), dataElementComparator );
-
-            displayPropertyHandler.handle( new ArrayList<DataElement>(dataElements) );
+            Collections.sort( new ArrayList<DataElement>( dataElements ), new IdentifiableObjectNameComparator() );
         }
 
         return SUCCESS;

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/dataentryform/ViewDataEntryFormAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/dataentryform/ViewDataEntryFormAction.java	2012-01-11 05:31:53 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/dataentryform/ViewDataEntryFormAction.java	2012-01-20 10:38:11 +0000
@@ -29,13 +29,12 @@
 
 import java.util.ArrayList;
 import java.util.Collections;
-import java.util.Comparator;
 import java.util.List;
 
+import org.hisp.dhis.common.comparator.IdentifiableObjectNameComparator;
 import org.hisp.dhis.dataelement.DataElement;
 import org.hisp.dhis.dataentryform.DataEntryForm;
 import org.hisp.dhis.dataentryform.DataEntryFormService;
-import org.hisp.dhis.options.displayproperty.DisplayPropertyHandler;
 import org.hisp.dhis.program.ProgramDataEntryService;
 import org.hisp.dhis.program.ProgramStage;
 import org.hisp.dhis.program.ProgramStageDataElementService;
@@ -86,28 +85,6 @@
     }
 
     // -------------------------------------------------------------------------
-    // Comparator
-    // -------------------------------------------------------------------------
-
-    private Comparator<DataElement> dataElementComparator;
-
-    public void setDataElementComparator( Comparator<DataElement> dataElementComparator )
-    {
-        this.dataElementComparator = dataElementComparator;
-    }
-
-    // -------------------------------------------------------------------------
-    // DisplayPropertyHandler
-    // -------------------------------------------------------------------------
-
-    private DisplayPropertyHandler displayPropertyHandler;
-
-    public void setDisplayPropertyHandler( DisplayPropertyHandler displayPropertyHandler )
-    {
-        this.displayPropertyHandler = displayPropertyHandler;
-    }
-
-    // -------------------------------------------------------------------------
     // Getters & Setters
     // -------------------------------------------------------------------------
 
@@ -216,10 +193,8 @@
 
         dataElements = new ArrayList<DataElement>( programStageDataElementService.getListDataElement( programStage ) );
         
-        Collections.sort( dataElements, dataElementComparator );
+        Collections.sort( dataElements, new IdentifiableObjectNameComparator() );
         
-        displayPropertyHandler.handle( dataElements );
-
         return SUCCESS;
     }
 }

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/user/GetGeneralSettingsAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/user/GetGeneralSettingsAction.java	2012-01-04 10:03:24 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/user/GetGeneralSettingsAction.java	2012-01-20 10:38:11 +0000
@@ -41,8 +41,6 @@
 import org.hisp.dhis.i18n.I18nService;
 import org.hisp.dhis.i18n.locale.LocaleManager;
 import org.hisp.dhis.i18n.resourcebundle.ResourceBundleManager;
-import org.hisp.dhis.options.displayproperty.DisplayPropertyManager;
-import org.hisp.dhis.options.sortorder.SortOrderManager;
 import org.hisp.dhis.options.style.StyleManager;
 import org.hisp.dhis.user.UserSettingService;
 
@@ -88,13 +86,6 @@
         this.localeManagerInterface = localeManagerInterface;
     }
 
-    private SortOrderManager sortOrderManager;
-
-    public void setSortOrderManager( SortOrderManager sortOrderManager )
-    {
-        this.sortOrderManager = sortOrderManager;
-    }
-
     private UserSettingService userSettingService;
 
     public void setUserSettingService( UserSettingService userSettingService )
@@ -109,13 +100,6 @@
         this.styleManager = styleManager;
     }
 
-    private DisplayPropertyManager displayPropertyManager;
-
-    public void setDisplayPropertyManager( DisplayPropertyManager displayPropertyManager )
-    {
-        this.displayPropertyManager = displayPropertyManager;
-    }
-
     // -------------------------------------------------------------------------
     // Output
     // -------------------------------------------------------------------------
@@ -256,14 +240,6 @@
         currentLocaleDb = localeManagerDB.getCurrentLocale();
 
         // ---------------------------------------------------------------------
-        // Get Sort orders
-        // ---------------------------------------------------------------------
-
-        sortOrders = sortOrderManager.getSortOrders();
-
-        currentSortOrder = sortOrderManager.getCurrentSortOrder();
-
-        // ---------------------------------------------------------------------
         // Get Charts in Dashboard
         // ---------------------------------------------------------------------
 
@@ -273,14 +249,6 @@
         chartsInDashboardOptions = UserSettingService.DASHBOARD_CHARTS_TO_DISPLAY;
 
         // ---------------------------------------------------------------------
-        // Get Display Properties
-        // ---------------------------------------------------------------------
-
-        displayProperties = displayPropertyManager.getDisplayProperties();
-
-        currentDisplayProperty = displayPropertyManager.getCurrentDisplayProperty();
-
-        // ---------------------------------------------------------------------
         // Get Auto-save data entry form
         // ---------------------------------------------------------------------
 

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/user/SetGeneralSettingsAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/user/SetGeneralSettingsAction.java	2012-01-04 10:03:24 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/user/SetGeneralSettingsAction.java	2012-01-20 10:38:11 +0000
@@ -33,8 +33,6 @@
 import java.util.Locale;
 
 import org.hisp.dhis.i18n.locale.LocaleManager;
-import org.hisp.dhis.options.displayproperty.DisplayPropertyManager;
-import org.hisp.dhis.options.sortorder.SortOrderManager;
 import org.hisp.dhis.options.style.StyleManager;
 import org.hisp.dhis.user.UserSettingService;
 
@@ -51,13 +49,6 @@
     // Dependencies
     // -------------------------------------------------------------------------
 
-    private DisplayPropertyManager displayPropertyManager;
-
-    public void setDisplayPropertyManager( DisplayPropertyManager displayPropertyManager )
-    {
-        this.displayPropertyManager = displayPropertyManager;
-    }
-
     private LocaleManager localeManagerInterface;
 
     public void setLocaleManagerInterface( LocaleManager localeManagerInterface )
@@ -72,13 +63,6 @@
         this.localeManagerDB = localeManagerDB;
     }
 
-    private SortOrderManager sortOrderManager;
-
-    public void setSortOrderManager( SortOrderManager sortOrderManager )
-    {
-        this.sortOrderManager = sortOrderManager;
-    }
-
     private StyleManager styleManager;
 
     public void setStyleManager( StyleManager styleManager )
@@ -111,13 +95,6 @@
         this.chartsInDashboard = chartsInDashboard;
     }
 
-    private String currentDisplayProperty;
-
-    public void setCurrentDisplayProperty( String currentDisplayProperty )
-    {
-        this.currentDisplayProperty = currentDisplayProperty;
-    }
-
     private String currentLocale;
 
     public void setCurrentLocale( String locale )
@@ -132,13 +109,6 @@
         this.currentLocaleDb = currentLocaleDb;
     }
 
-    private String currentSortOrder;
-
-    public void setCurrentSortOrder( String currentSortOrder )
-    {
-        this.currentSortOrder = currentSortOrder;
-    }
-
     private String currentStyle;
 
     public void setCurrentStyle( String style )
@@ -157,10 +127,6 @@
 
         localeManagerDB.setCurrentLocale( getRespectiveLocale( currentLocaleDb ) );
 
-        sortOrderManager.setCurrentSortOrder( currentSortOrder );
-
-        displayPropertyManager.setCurrentDisplayProperty( currentDisplayProperty );
-
         styleManager.setUserStyle( currentStyle );
 
         userSettingService.saveUserSetting( KEY_CHARTS_IN_DASHBOARD, chartsInDashboard );

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/resources/META-INF/dhis/beans.xml	2012-01-05 20:39:23 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/resources/META-INF/dhis/beans.xml	2012-01-20 10:38:11 +0000
@@ -47,7 +47,9 @@
   </bean>
 
 	<!-- User settings -->
-		<!-- General settings -->
+	
+	<!-- General settings -->
+	
   <bean id="org.hisp.dhis.settings.action.user.GetGeneralSettingsAction" class="org.hisp.dhis.settings.action.user.GetGeneralSettingsAction"
     scope="prototype">
     <property name="resourceBundleManager">
@@ -62,12 +64,6 @@
     <property name="localeManagerDB">
       <ref bean="org.hisp.dhis.i18n.locale.LocaleManagerDb" />
     </property>
-    <property name="sortOrderManager">
-      <ref bean="org.hisp.dhis.options.sortorder.SortOrderManager" />
-    </property>
-    <property name="displayPropertyManager">
-      <ref bean="org.hisp.dhis.options.displayproperty.DisplayPropertyManager" />
-    </property>
     <property name="userSettingService">
       <ref bean="org.hisp.dhis.user.UserSettingService" />
     </property>
@@ -84,12 +80,6 @@
     <property name="localeManagerDB">
       <ref bean="org.hisp.dhis.i18n.locale.LocaleManagerDb" />
     </property>
-    <property name="sortOrderManager">
-      <ref bean="org.hisp.dhis.options.sortorder.SortOrderManager" />
-    </property>
-    <property name="displayPropertyManager">
-      <ref bean="org.hisp.dhis.options.displayproperty.DisplayPropertyManager" />
-    </property>
     <property name="userSettingService">
       <ref bean="org.hisp.dhis.user.UserSettingService" />
     </property>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/SetupRoleAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/SetupRoleAction.java	2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/SetupRoleAction.java	2012-01-20 10:38:11 +0000
@@ -29,12 +29,11 @@
 
 import java.util.ArrayList;
 import java.util.Collections;
-import java.util.Comparator;
 import java.util.List;
 
+import org.hisp.dhis.common.comparator.IdentifiableObjectNameComparator;
 import org.hisp.dhis.dataset.DataSet;
 import org.hisp.dhis.dataset.DataSetService;
-import org.hisp.dhis.options.displayproperty.DisplayPropertyHandler;
 import org.hisp.dhis.report.Report;
 import org.hisp.dhis.security.authority.SystemAuthoritiesProvider;
 
@@ -65,20 +64,6 @@
         this.authoritiesProvider = authoritiesProvider;
     }
 
-    private Comparator<DataSet> dataSetComparator;
-
-    public void setDataSetComparator( Comparator<DataSet> dataSetComparator )
-    {
-        this.dataSetComparator = dataSetComparator;
-    }
-
-    private DisplayPropertyHandler displayPropertyHandler;
-
-    public void setDisplayPropertyHandler( DisplayPropertyHandler displayPropertyHandler )
-    {
-        this.displayPropertyHandler = displayPropertyHandler;
-    }
-
     // -------------------------------------------------------------------------
     // Output
     // -------------------------------------------------------------------------
@@ -113,9 +98,7 @@
     {
         availableDataSets = new ArrayList<DataSet>( dataSetService.getAllDataSets() );
 
-        Collections.sort( availableDataSets, dataSetComparator );
-
-        displayPropertyHandler.handle( availableDataSets );
+        Collections.sort( availableDataSets, new IdentifiableObjectNameComparator() );
 
         availableAuthorities = new ArrayList<String>( authoritiesProvider.getSystemAuthorities() );
 

=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetAllDataElementsAction.java'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetAllDataElementsAction.java	2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetAllDataElementsAction.java	2012-01-20 10:38:11 +0000
@@ -29,12 +29,11 @@
 
 import java.util.ArrayList;
 import java.util.Collections;
-import java.util.Comparator;
 import java.util.List;
 
+import org.hisp.dhis.common.comparator.IdentifiableObjectNameComparator;
 import org.hisp.dhis.dataelement.DataElement;
 import org.hisp.dhis.dataelement.DataElementService;
-import org.hisp.dhis.options.displayproperty.DisplayPropertyHandler;
 
 import com.opensymphony.xwork2.Action;
 
@@ -56,20 +55,6 @@
         this.dataElementService = dataElementService;
     }
 
-    private DisplayPropertyHandler displayPropertyHandler;
-
-    public void setDisplayPropertyHandler( DisplayPropertyHandler displayPropertyHandler )
-    {
-        this.displayPropertyHandler = displayPropertyHandler;
-    }
-
-    private Comparator<DataElement> dataElementComparator;
-
-    public void setDataElementComparator( Comparator<DataElement> dataElementComparator )
-    {
-        this.dataElementComparator = dataElementComparator;
-    }
-
     // -------------------------------------------------------------------------
     // Output
     // -------------------------------------------------------------------------
@@ -90,9 +75,7 @@
     {
         object = new ArrayList<DataElement>( dataElementService.getAllDataElements() );
         
-        Collections.sort( object, dataElementComparator );
-        
-        displayPropertyHandler.handle( object );
+        Collections.sort( object, new IdentifiableObjectNameComparator() );
         
         return SUCCESS;
     }

=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetAllIndicatorsAction.java'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetAllIndicatorsAction.java	2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetAllIndicatorsAction.java	2012-01-20 10:38:11 +0000
@@ -29,12 +29,11 @@
 
 import java.util.ArrayList;
 import java.util.Collections;
-import java.util.Comparator;
 import java.util.List;
 
+import org.hisp.dhis.common.comparator.IdentifiableObjectNameComparator;
 import org.hisp.dhis.indicator.Indicator;
 import org.hisp.dhis.indicator.IndicatorService;
-import org.hisp.dhis.options.displayproperty.DisplayPropertyHandler;
 
 import com.opensymphony.xwork2.Action;
 
@@ -56,20 +55,6 @@
         this.indicatorService = indicatorService;
     }
 
-    private DisplayPropertyHandler displayPropertyHandler;
-
-    public void setDisplayPropertyHandler( DisplayPropertyHandler displayPropertyHandler )
-    {
-        this.displayPropertyHandler = displayPropertyHandler;
-    }
-
-    private Comparator<Indicator> indicatorComparator;
-
-    public void setIndicatorComparator( Comparator<Indicator> indicatorComparator )
-    {
-        this.indicatorComparator = indicatorComparator;
-    }
-
     // -------------------------------------------------------------------------
     // Output
     // -------------------------------------------------------------------------
@@ -90,9 +75,7 @@
     {
         object = new ArrayList<Indicator>( indicatorService.getAllIndicators() );
         
-        Collections.sort( object, indicatorComparator );
-        
-        displayPropertyHandler.handle( object );
+        Collections.sort( object, new IdentifiableObjectNameComparator() );
         
         return SUCCESS;
     }

=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetDataElementsByDataElementGroupAction.java'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetDataElementsByDataElementGroupAction.java	2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetDataElementsByDataElementGroupAction.java	2012-01-20 10:38:11 +0000
@@ -29,13 +29,12 @@
 
 import java.util.ArrayList;
 import java.util.Collections;
-import java.util.Comparator;
 import java.util.List;
 
+import org.hisp.dhis.common.comparator.IdentifiableObjectNameComparator;
 import org.hisp.dhis.dataelement.DataElement;
 import org.hisp.dhis.dataelement.DataElementGroup;
 import org.hisp.dhis.dataelement.DataElementService;
-import org.hisp.dhis.options.displayproperty.DisplayPropertyHandler;
 
 import com.opensymphony.xwork2.Action;
 
@@ -57,20 +56,6 @@
         this.dataElementService = dataElementService;
     }
 
-    private DisplayPropertyHandler displayPropertyHandler;
-
-    public void setDisplayPropertyHandler( DisplayPropertyHandler displayPropertyHandler )
-    {
-        this.displayPropertyHandler = displayPropertyHandler;
-    }
-
-    private Comparator<DataElement> dataElementComparator;
-
-    public void setDataElementComparator( Comparator<DataElement> dataElementComparator )
-    {
-        this.dataElementComparator = dataElementComparator;
-    }
-
     // -------------------------------------------------------------------------
     // Input
     // -------------------------------------------------------------------------
@@ -106,9 +91,7 @@
         {
             object = new ArrayList<DataElement>( group.getMembers() );
 
-            Collections.sort( object, dataElementComparator );
-            
-            displayPropertyHandler.handle( object );
+            Collections.sort( object, new IdentifiableObjectNameComparator() );
         }
         
         return SUCCESS;

=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetIndicatorsByIndicatorGroupAction.java'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetIndicatorsByIndicatorGroupAction.java	2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetIndicatorsByIndicatorGroupAction.java	2012-01-20 10:38:11 +0000
@@ -29,13 +29,12 @@
 
 import java.util.ArrayList;
 import java.util.Collections;
-import java.util.Comparator;
 import java.util.List;
 
+import org.hisp.dhis.common.comparator.IdentifiableObjectNameComparator;
 import org.hisp.dhis.indicator.Indicator;
 import org.hisp.dhis.indicator.IndicatorGroup;
 import org.hisp.dhis.indicator.IndicatorService;
-import org.hisp.dhis.options.displayproperty.DisplayPropertyHandler;
 
 import com.opensymphony.xwork2.Action;
 
@@ -57,20 +56,6 @@
         this.indicatorService = indicatorService;
     }
 
-    private DisplayPropertyHandler displayPropertyHandler;
-
-    public void setDisplayPropertyHandler( DisplayPropertyHandler displayPropertyHandler )
-    {
-        this.displayPropertyHandler = displayPropertyHandler;
-    }
-
-    private Comparator<Indicator> indicatorComparator;
-
-    public void setIndicatorComparator( Comparator<Indicator> indicatorComparator )
-    {
-        this.indicatorComparator = indicatorComparator;
-    }
-
     // -------------------------------------------------------------------------
     // Input
     // -------------------------------------------------------------------------
@@ -108,9 +93,7 @@
             {
                 object = new ArrayList<Indicator>( group.getMembers() );
     
-                Collections.sort( object, indicatorComparator );
-                
-                displayPropertyHandler.handle( object );
+                Collections.sort( object, new IdentifiableObjectNameComparator() );
                 
                 return SUCCESS;
             }

=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetOrganisationUnitChildrenAction.java'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetOrganisationUnitChildrenAction.java	2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetOrganisationUnitChildrenAction.java	2012-01-20 10:38:11 +0000
@@ -29,10 +29,9 @@
 
 import java.util.ArrayList;
 import java.util.Collections;
-import java.util.Comparator;
 import java.util.List;
 
-import org.hisp.dhis.options.displayproperty.DisplayPropertyHandler;
+import org.hisp.dhis.common.comparator.IdentifiableObjectNameComparator;
 import org.hisp.dhis.organisationunit.OrganisationUnit;
 import org.hisp.dhis.organisationunit.OrganisationUnitService;
 
@@ -55,20 +54,6 @@
         this.organisationUnitService = organisationUnitService;
     }
 
-    private Comparator<OrganisationUnit> organisationUnitComparator;
-
-    public void setOrganisationUnitComparator( Comparator<OrganisationUnit> organisationUnitComparator )
-    {
-        this.organisationUnitComparator = organisationUnitComparator;
-    }
-
-    private DisplayPropertyHandler displayPropertyHandler;
-
-    public void setDisplayPropertyHandler( DisplayPropertyHandler displayPropertyHandler )
-    {
-        this.displayPropertyHandler = displayPropertyHandler;
-    }
-
     // -------------------------------------------------------------------------
     // Input
     // -------------------------------------------------------------------------
@@ -112,9 +97,7 @@
                 organisationUnit.setLevel( level );
             }
 
-            Collections.sort( units, organisationUnitComparator );
-            
-            displayPropertyHandler.handle( units );
+            Collections.sort( units, new IdentifiableObjectNameComparator() );
         }
         
         return SUCCESS;

=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetOrganisationUnitsAtLevelAction.java'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetOrganisationUnitsAtLevelAction.java	2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetOrganisationUnitsAtLevelAction.java	2012-01-20 10:38:11 +0000
@@ -29,10 +29,9 @@
 
 import java.util.ArrayList;
 import java.util.Collections;
-import java.util.Comparator;
 import java.util.List;
 
-import org.hisp.dhis.options.displayproperty.DisplayPropertyHandler;
+import org.hisp.dhis.common.comparator.IdentifiableObjectNameComparator;
 import org.hisp.dhis.organisationunit.OrganisationUnit;
 import org.hisp.dhis.organisationunit.OrganisationUnitService;
 
@@ -56,20 +55,6 @@
         this.organisationUnitService = organisationUnitService;
     }
     
-    private Comparator<OrganisationUnit> organisationUnitComparator;
-
-    public void setOrganisationUnitComparator( Comparator<OrganisationUnit> organisationUnitComparator )
-    {
-        this.organisationUnitComparator = organisationUnitComparator;
-    }
-
-    private DisplayPropertyHandler displayPropertyHandler;
-
-    public void setDisplayPropertyHandler( DisplayPropertyHandler displayPropertyHandler )
-    {
-        this.displayPropertyHandler = displayPropertyHandler;
-    }
-
     // -------------------------------------------------------------------------
     // Input
     // -------------------------------------------------------------------------
@@ -101,9 +86,7 @@
     {
         object = new ArrayList<OrganisationUnit>( organisationUnitService.getOrganisationUnitsAtLevel( level ) );
         
-        Collections.sort( object, organisationUnitComparator );
-        
-        displayPropertyHandler.handle( object );
+        Collections.sort( object, new IdentifiableObjectNameComparator() );
         
         return SUCCESS;
     }

=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/tablecreator/action/GetTableOptionsAction.java'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/tablecreator/action/GetTableOptionsAction.java	2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/tablecreator/action/GetTableOptionsAction.java	2012-01-20 10:38:11 +0000
@@ -53,7 +53,6 @@
 import org.hisp.dhis.indicator.IndicatorGroup;
 import org.hisp.dhis.indicator.IndicatorService;
 import org.hisp.dhis.indicator.comparator.IndicatorGroupNameComparator;
-import org.hisp.dhis.options.displayproperty.DisplayPropertyHandler;
 import org.hisp.dhis.organisationunit.OrganisationUnit;
 import org.hisp.dhis.organisationunit.OrganisationUnitGroup;
 import org.hisp.dhis.organisationunit.OrganisationUnitGroupService;
@@ -154,20 +153,6 @@
         this.format = format;
     }
 
-    private Comparator<OrganisationUnit> organisationUnitComparator;
-
-    public void setOrganisationUnitComparator( Comparator<OrganisationUnit> organisationUnitComparator )
-    {
-        this.organisationUnitComparator = organisationUnitComparator;
-    }
-    
-    private DisplayPropertyHandler displayPropertyHandler;
-    
-    public void setDisplayPropertyHandler( DisplayPropertyHandler displayPropertyHandler )
-    {
-        this.displayPropertyHandler = displayPropertyHandler;
-    }
-
     // -------------------------------------------------------------------------
     // Input
     // -------------------------------------------------------------------------
@@ -357,15 +342,13 @@
             
             dataElements = new ArrayList<DataElement>( dataElementService.getAllDataElements() );            
             Collections.sort( dataElements, new DataElementNameComparator() );            
-            FilterUtils.filter( dataElements, new AggregatableDataElementFilter() );            
-            displayPropertyHandler.handle( dataElements );
+            FilterUtils.filter( dataElements, new AggregatableDataElementFilter() );
             
             indicatorGroups = new ArrayList<IndicatorGroup>( indicatorService.getAllIndicatorGroups() );            
             Collections.sort( indicatorGroups, new IndicatorGroupNameComparator() );
             
             indicators = new ArrayList<Indicator>( indicatorService.getAllIndicators() );            
-            Collections.sort( indicators, indicatorComparator );            
-            displayPropertyHandler.handle( indicators );
+            Collections.sort( indicators, indicatorComparator );
             
             dataSets = new ArrayList<DataSet>( dataSetService.getAllDataSets() );            
             Collections.sort( dataSets, new DataSetNameComparator() ); 
@@ -380,8 +363,7 @@
         levels = organisationUnitService.getOrganisationUnitLevels();
         
         organisationUnits = new ArrayList<OrganisationUnit>( organisationUnitService.getOrganisationUnitsAtLevel( 1 ) );
-        displayPropertyHandler.handle( organisationUnits );
-        Collections.sort( organisationUnits, organisationUnitComparator );
+        Collections.sort( organisationUnits, new IdentifiableObjectNameComparator() );
         
         organisationUnitGroups = new ArrayList<OrganisationUnitGroup>( organisationUnitGroupService.getOrganisationUnitGroupsWithGroupSets() );
         Collections.sort( organisationUnitGroups, new IdentifiableObjectNameComparator() );

=== modified file 'dhis-2/dhis-web/dhis-web-validationrule/src/main/java/org/hisp/dhis/validationrule/action/GetFilteredDataElementsAction.java'
--- dhis-2/dhis-web/dhis-web-validationrule/src/main/java/org/hisp/dhis/validationrule/action/GetFilteredDataElementsAction.java	2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-web/dhis-web-validationrule/src/main/java/org/hisp/dhis/validationrule/action/GetFilteredDataElementsAction.java	2012-01-20 10:38:11 +0000
@@ -30,19 +30,18 @@
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
-import java.util.Comparator;
 import java.util.HashSet;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Set;
 
+import org.hisp.dhis.common.comparator.IdentifiableObjectNameComparator;
 import org.hisp.dhis.dataelement.DataElement;
 import org.hisp.dhis.dataelement.DataElementCategoryService;
 import org.hisp.dhis.dataelement.DataElementOperand;
 import org.hisp.dhis.dataset.DataSet;
 import org.hisp.dhis.dataset.DataSetService;
 import org.hisp.dhis.dataset.comparator.DataSetSortOrderComparator;
-import org.hisp.dhis.options.displayproperty.DisplayPropertyHandler;
 import org.hisp.dhis.period.PeriodService;
 import org.hisp.dhis.period.PeriodType;
 
@@ -84,28 +83,6 @@
     }
 
     // -------------------------------------------------------------------------
-    // Comparator
-    // -------------------------------------------------------------------------
-
-    private Comparator<DataElement> dataElementComparator;
-
-    public void setDataElementComparator( Comparator<DataElement> dataElementComparator )
-    {
-        this.dataElementComparator = dataElementComparator;
-    }
-
-    // -------------------------------------------------------------------------
-    // DisplayPropertyHandler
-    // -------------------------------------------------------------------------
-
-    private DisplayPropertyHandler displayPropertyHandler;
-
-    public void setDisplayPropertyHandler( DisplayPropertyHandler displayPropertyHandler )
-    {
-        this.displayPropertyHandler = displayPropertyHandler;
-    }
-
-    // -------------------------------------------------------------------------
     // Parameters
     // -------------------------------------------------------------------------
 
@@ -177,8 +154,6 @@
 
             Collections.sort( dataSets, new DataSetSortOrderComparator() );
 
-            displayPropertyHandler.handle( dataSets );
-
             // -----------------------------------------------------------------
             // Get available dataelements into the dataSets
             // -----------------------------------------------------------------
@@ -199,9 +174,7 @@
             dataElements = new ArrayList<DataElement>( getIntegerDataElements( members ) );
         }
 
-        Collections.sort( dataElements, dataElementComparator );
-
-        displayPropertyHandler.handle( dataElements );
+        Collections.sort( dataElements, new IdentifiableObjectNameComparator() );
 
         // ---------------------------------------------------------------------
         // Create Operands

=== modified file 'dhis-2/dhis-web/dhis-web-validationrule/src/main/java/org/hisp/dhis/validationrule/action/dataanalysis/ViewAnalysisFormAction.java'
--- dhis-2/dhis-web/dhis-web-validationrule/src/main/java/org/hisp/dhis/validationrule/action/dataanalysis/ViewAnalysisFormAction.java	2010-06-29 00:24:10 +0000
+++ dhis-2/dhis-web/dhis-web-validationrule/src/main/java/org/hisp/dhis/validationrule/action/dataanalysis/ViewAnalysisFormAction.java	2012-01-20 10:38:11 +0000
@@ -29,12 +29,11 @@
 
 import java.util.ArrayList;
 import java.util.Collections;
-import java.util.Comparator;
 import java.util.List;
 
+import org.hisp.dhis.common.comparator.IdentifiableObjectNameComparator;
 import org.hisp.dhis.dataset.DataSet;
 import org.hisp.dhis.dataset.DataSetService;
-import org.hisp.dhis.options.displayproperty.DisplayPropertyHandler;
 
 import com.opensymphony.xwork2.Action;
 
@@ -59,20 +58,6 @@
         this.dataSetService = dataSetService;
     }
     
-    private Comparator<DataSet> dataSetComparator;
-
-    public void setDataSetComparator( Comparator<DataSet> dataSetComparator )
-    {
-        this.dataSetComparator = dataSetComparator;
-    }
-    
-    private DisplayPropertyHandler displayPropertyHandler;
-    
-    public void setDisplayPropertyHandler( DisplayPropertyHandler displayPropertyHandler )
-    {
-        this.displayPropertyHandler = displayPropertyHandler;
-    }
-
     // -------------------------------------------------------------------------
     // Input & output
     // -------------------------------------------------------------------------
@@ -104,9 +89,7 @@
     {
         dataSets = new ArrayList<DataSet>( dataSetService.getAllDataSets() );
         
-        Collections.sort( dataSets, dataSetComparator );
-        
-        displayPropertyHandler.handle( dataSets );
+        Collections.sort( dataSets, new IdentifiableObjectNameComparator() );
         
         return SUCCESS;
     }

=== modified file 'dhis-2/dhis-web/dhis-web-visualizer/src/main/java/org/hisp/dhis/visualizer/action/GetOrganisationUnitChildrenAction.java'
--- dhis-2/dhis-web/dhis-web-visualizer/src/main/java/org/hisp/dhis/visualizer/action/GetOrganisationUnitChildrenAction.java	2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-web/dhis-web-visualizer/src/main/java/org/hisp/dhis/visualizer/action/GetOrganisationUnitChildrenAction.java	2012-01-20 10:38:11 +0000
@@ -29,10 +29,9 @@
 
 import java.util.ArrayList;
 import java.util.Collections;
-import java.util.Comparator;
 import java.util.List;
 
-import org.hisp.dhis.options.displayproperty.DisplayPropertyHandler;
+import org.hisp.dhis.common.comparator.IdentifiableObjectNameComparator;
 import org.hisp.dhis.organisationunit.OrganisationUnit;
 import org.hisp.dhis.organisationunit.OrganisationUnitService;
 
@@ -55,20 +54,6 @@
         this.organisationUnitService = organisationUnitService;
     }
 
-    private Comparator<OrganisationUnit> organisationUnitComparator;
-
-    public void setOrganisationUnitComparator( Comparator<OrganisationUnit> organisationUnitComparator )
-    {
-        this.organisationUnitComparator = organisationUnitComparator;
-    }
-
-    private DisplayPropertyHandler displayPropertyHandler;
-
-    public void setDisplayPropertyHandler( DisplayPropertyHandler displayPropertyHandler )
-    {
-        this.displayPropertyHandler = displayPropertyHandler;
-    }
-
     // -------------------------------------------------------------------------
     // Input
     // -------------------------------------------------------------------------
@@ -112,9 +97,7 @@
                 organisationUnit.setLevel( level );
             }
 
-            Collections.sort( units, organisationUnitComparator );
-            
-            displayPropertyHandler.handle( units );
+            Collections.sort( units, new IdentifiableObjectNameComparator() );
         }
         
         return SUCCESS;