dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #31664
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 16169: Fixed bug, nullpointer exception when opening translation screen for category and category option
------------------------------------------------------------
revno: 16169
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2014-07-18 12:53:59 +0200
message:
Fixed bug, nullpointer exception when opening translation screen for category and category option
modified:
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/i18n/DefaultI18nService.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/multidimensional/category.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/multidimensional/categoryOption.vm
--
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-core/src/main/java/org/hisp/dhis/i18n/DefaultI18nService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/i18n/DefaultI18nService.java 2014-05-15 06:21:07 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/i18n/DefaultI18nService.java 2014-07-18 10:53:59 +0000
@@ -154,6 +154,11 @@
public Map<String, String> getObjectPropertyValues( Object object )
{
+ if ( object != null )
+ {
+ return null;
+ }
+
List<String> properties = getObjectPropertyNames( object );
Map<String, String> translations = new HashMap<String, String>();
@@ -168,6 +173,11 @@
public List<String> getObjectPropertyNames( Object object )
{
+ if ( object != null )
+ {
+ return null;
+ }
+
if ( !(object instanceof IdentifiableObject) )
{
throw new IllegalArgumentException( "I18n object must be identifiable: " + object );
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/multidimensional/category.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/multidimensional/category.vm 2014-06-12 16:08:03 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/multidimensional/category.vm 2014-07-18 10:53:59 +0000
@@ -64,7 +64,7 @@
<tbody id="list">
#foreach( $dataElementCategory in $dataElementCategories )
#if( $dataElementCategory.id != $defaultCategory.id )
- <tr id="tr${dataElementCategory.id}" data-id="$!dataElementCategory.id" data-uid="$!dataElementCategory.uid" data-type="Category" data-name="$encoder.htmlEncode( $!dataElementCategory.displayName )"
+ <tr id="tr${dataElementCategory.id}" data-id="$!dataElementCategory.id" data-uid="$!dataElementCategory.uid" data-type="DataElementCategory" data-name="$encoder.htmlEncode( $!dataElementCategory.displayName )"
data-can-manage="$security.canManage( $dataElementCategory )"
data-can-update="$security.canUpdate( $dataElementCategory )"
data-can-delete="$security.canDelete( $dataElementCategory )">
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/multidimensional/categoryOption.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/multidimensional/categoryOption.vm 2014-06-12 16:08:03 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/multidimensional/categoryOption.vm 2014-07-18 10:53:59 +0000
@@ -67,7 +67,7 @@
<tbody id="list">
#foreach( $dataElementCategoryOption in $dataElementCategoryOptions )
#if( $dataElementCategoryOption.id != $defaultCategoryOption.id )
- <tr id="tr${dataElementCategoryOption.id}" data-id="$!dataElementCategoryOption.id" data-uid="$!dataElementCategoryOption.uid" data-type="CategoryOption" data-name="$encoder.htmlEncode( $!dataElementCategoryOption.displayName )"
+ <tr id="tr${dataElementCategoryOption.id}" data-id="$!dataElementCategoryOption.id" data-uid="$!dataElementCategoryOption.uid" data-type="DataElementCategoryOption" data-name="$encoder.htmlEncode( $!dataElementCategoryOption.displayName )"
data-can-manage="$security.canManage( $dataElementCategoryOption )"
data-can-update="$security.canUpdate( $dataElementCategoryOption )"
data-can-delete="$security.canDelete( $dataElementCategoryOption )">