dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #34347
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 17632: bugfix for filtered collection (itemName)
------------------------------------------------------------
revno: 17632
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2014-12-01 13:33:27 +0700
message:
bugfix for filtered collection (itemName)
modified:
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/fieldfilter/DefaultFieldFilterService.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-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/fieldfilter/DefaultFieldFilterService.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/fieldfilter/DefaultFieldFilterService.java 2014-11-18 05:20:53 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/fieldfilter/DefaultFieldFilterService.java 2014-12-01 06:33:27 +0000
@@ -154,8 +154,14 @@
private AbstractNode buildNode( FieldMap fieldMap, Class<?> klass, Object object )
{
Schema schema = schemaService.getDynamicSchema( klass );
-
- ComplexNode complexNode = new ComplexNode( schema.getName() );
+ return buildNode( fieldMap, klass, object, schema.getName() );
+ }
+
+ private AbstractNode buildNode( FieldMap fieldMap, Class<?> klass, Object object, String nodeName )
+ {
+ Schema schema = schemaService.getDynamicSchema( klass );
+
+ ComplexNode complexNode = new ComplexNode( nodeName );
complexNode.setNamespace( schema.getNamespace() );
if ( object == null )
@@ -268,7 +274,7 @@
for ( Object collectionObject : (Collection<?>) returnValue )
{
- Node node = buildNode( fieldValue, property.getItemKlass(), collectionObject );
+ Node node = buildNode( fieldValue, property.getItemKlass(), collectionObject, property.getName() );
if ( !node.getChildren().isEmpty() )
{