=== modified file 'dhis-2/dhis-options/src/main/java/org/hisp/dhis/options/displayproperty/DefaultDisplayPropertyHandler.java' --- dhis-2/dhis-options/src/main/java/org/hisp/dhis/options/displayproperty/DefaultDisplayPropertyHandler.java 2009-10-05 16:07:55 +0000 +++ dhis-2/dhis-options/src/main/java/org/hisp/dhis/options/displayproperty/DefaultDisplayPropertyHandler.java 2009-10-06 11:12:35 +0000 @@ -51,36 +51,9 @@ public List handle( List list ) { - if ( displayProperty.equals( DisplayPropertyManager.DISPLAY_PROPERTY_SHORTNAME ) ) - { - for ( IdentifiableObject object : list ) - { - if ( object.getShortName() != null ) - { - object.setName( object.getShortName() ); - } - } - } - else if ( displayProperty.equals( DisplayPropertyManager.DISPLAY_PROPERTY_CODE ) ) - { - for ( IdentifiableObject object : list ) - { - if ( object.getCode() != null ) - { - object.setName( object.getCode() ); - } - } - } - - else if ( displayProperty.equals( DisplayPropertyManager.DISPLAY_PROPERTY_ALTERNATIVENAME ) ) - { - for ( IdentifiableObject object : list ) - { - if ( object.getAlternativeName() != null ) - { - object.setName( object.getAlternativeName() ); - } - } + for ( IdentifiableObject object : list ) + { + handle( object ); } return list; @@ -101,8 +74,7 @@ { object.setName( object.getCode() ); } - } - + } else if ( displayProperty.equals( DisplayPropertyManager.DISPLAY_PROPERTY_ALTERNATIVENAME ) ) { if ( object.getAlternativeName() != null )