dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #15224
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 5416: fixed some issues with xmloutput for grid
------------------------------------------------------------
revno: 5416
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2011-12-14 16:07:54 +0100
message:
fixed some issues with xmloutput for grid
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/GridHeader.java
dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/grid/ListGrid.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/GridHeader.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/GridHeader.java 2011-12-14 12:52:07 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/GridHeader.java 2011-12-14 15:07:54 +0000
@@ -2,10 +2,7 @@
import org.codehaus.jackson.annotate.JsonProperty;
-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.*;
import java.util.Arrays;
import java.util.List;
@@ -98,7 +95,7 @@
return type != null && NUMERIC_TYPES.contains( type );
}
- @XmlElement
+ @XmlAttribute( namespace = Dxf2Namespace.NAMESPACE )
@JsonProperty
public String getName()
{
=== modified file 'dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/grid/ListGrid.java'
--- dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/grid/ListGrid.java 2011-12-14 12:52:07 +0000
+++ dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/grid/ListGrid.java 2011-12-14 15:07:54 +0000
@@ -107,7 +107,7 @@
// Public methods
// ---------------------------------------------------------------------
- @XmlElement
+ @XmlElement( namespace = Dxf2Namespace.NAMESPACE )
@JsonProperty
public String getTitle()
{
@@ -121,7 +121,7 @@
return this;
}
- @XmlElement
+ @XmlElement( namespace = Dxf2Namespace.NAMESPACE )
@JsonProperty
public String getSubtitle()
{
@@ -158,8 +158,8 @@
return this;
}
- @XmlElementWrapper( name = "headers" )
- @XmlElement( name = "header" )
+ @XmlElementWrapper( name = "headers", namespace = Dxf2Namespace.NAMESPACE )
+ @XmlElement( name = "header", namespace = Dxf2Namespace.NAMESPACE )
@JsonProperty( value = "headers" )
public List<GridHeader> getHeaders()
{
@@ -181,14 +181,14 @@
return tempHeaders;
}
- @XmlElement
+ @XmlElement( namespace = Dxf2Namespace.NAMESPACE )
@JsonProperty
public int getHeight()
{
return (grid != null && grid.size() > 0) ? grid.size() : 0;
}
- @XmlElement
+ @XmlElement( namespace = Dxf2Namespace.NAMESPACE )
@JsonProperty
public int getWidth()
{
@@ -225,7 +225,7 @@
return grid.get( rowIndex );
}
- @XmlElement
+ @XmlElement( namespace = Dxf2Namespace.NAMESPACE )
@XmlJavaTypeAdapter( GridRowsXmlAdapter.class )
@JsonProperty
public List<List<Object>> getRows()