← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 14610: Minor

 

------------------------------------------------------------
revno: 14610
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2014-04-02 15:14:11 +0200
message:
  Minor
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/BaseDimensionalObject.java


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/BaseDimensionalObject.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/BaseDimensionalObject.java	2014-04-01 12:44:59 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/BaseDimensionalObject.java	2014-04-02 13:14:11 +0000
@@ -154,6 +154,17 @@
         return dimensionName != null ? dimensionName : uid;
     }
     
+    /**
+     * Override from IdentifiableObject for DimensionalView.
+     */
+    @Override
+    @JsonView( {DimensionalView.class} )
+    @JsonProperty
+    public String getDisplayName()
+    {
+        return displayName != null && !displayName.trim().isEmpty() ? displayName : getName();
+    }
+    
     //--------------------------------------------------------------------------
     // Getters and setters
     //--------------------------------------------------------------------------