← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 16202: Form utils, added description for groups

 

------------------------------------------------------------
revno: 16202
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2014-07-21 13:43:03 +0200
message:
  Form utils, added description for groups
modified:
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/utils/FormUtils.java
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/webdomain/form/Group.java


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

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/utils/FormUtils.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/utils/FormUtils.java	2014-07-21 08:59:35 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/utils/FormUtils.java	2014-07-21 11:43:03 +0000
@@ -79,6 +79,7 @@
 
                 Group s = new Group();
                 s.setLabel( section.getDisplayName() );
+                s.setDescription( section.getDescription() );
                 s.setFields( fields );
                 form.getGroups().add( s );
             }
@@ -89,6 +90,7 @@
 
             Group s = new Group();
             s.setLabel( DataElementCategoryCombo.DEFAULT_CATEGORY_COMBO_NAME );
+            s.setDescription( DataElementCategoryCombo.DEFAULT_CATEGORY_COMBO_NAME );
             s.setFields( fields );
             form.getGroups().add( s );
         }

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/webdomain/form/Group.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/webdomain/form/Group.java	2014-07-09 01:44:58 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/webdomain/form/Group.java	2014-07-21 11:43:03 +0000
@@ -44,6 +44,8 @@
 public class Group
 {
     private String label;
+    
+    private String description;
 
     private List<Field> fields = new ArrayList<Field>();
 
@@ -63,6 +65,18 @@
         this.label = label;
     }
 
+    @JsonProperty
+    @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
+    public String getDescription()
+    {
+        return description;
+    }
+    
+    public void setDescription( String description )
+    {
+        this.description = description;
+    }
+
     @JsonProperty( value = "fields" )
     @JacksonXmlElementWrapper( localName = "fields", namespace = DxfNamespaces.DXF_2_0 )
     @JacksonXmlProperty( localName = "field", namespace = DxfNamespaces.DXF_2_0 )