← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 7296: quickfix for link generator

 

------------------------------------------------------------
revno: 7296
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2012-06-14 13:37:38 +0300
message:
  quickfix for link generator
modified:
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/AbstractCrudController.java
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/utils/WebUtils.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/api/controller/AbstractCrudController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/AbstractCrudController.java	2012-06-06 16:37:56 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/AbstractCrudController.java	2012-06-14 10:37:38 +0000
@@ -73,6 +73,7 @@
         WebOptions options = new WebOptions( parameters );
         WebMetaData metaData = new WebMetaData();
         List<T> entityList = getEntityList( metaData, options );
+        System.err.println("EntityList.size: " + entityList.size());
 
         ReflectionUtils.invokeSetterMethod( ExchangeClasses.getExportMap().get( getEntityClass() ), metaData, entityList );
 

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/utils/WebUtils.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/utils/WebUtils.java	2012-06-06 14:32:25 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/utils/WebUtils.java	2012-06-14 10:37:38 +0000
@@ -136,7 +136,14 @@
 
                     for ( IdentifiableObject object : objects )
                     {
-                        object.setLink( getPathWithUid( object ) );
+                        if ( object != null )
+                        {
+                            object.setLink( getPathWithUid( object ) );
+                        }
+                        else
+                        {
+                            System.err.println( "Object is null.. fixme!" );
+                        }
                     }
                 }
             }