Home Grails 3.3.2: NPE in fields plugin - decapitalizedName?
Reply: 0

Grails 3.3.2: NPE in fields plugin - decapitalizedName?

injecteer
1#
injecteer Published in 2017-12-05 09:41:05Z

I upgraded my app from Grails 3.2.11 to 3.3.2 and went into this issue.

I have a class:

class Measure {
  String name
  Map<String,String> titles = [:]
  static hasMany = [ units:Unit ]
}

and the scaffolded index.gsp with:

<f:table collection="${measureList}" properties="[ 'name', 'units', 'titles' ]"/>

When I try to open the page, I get

java.lang.NullPointerException: Cannot get property 'decapitalizedName' on null object at grails.plugin.formfields.FormFieldsTagLib.displayAssociation(FormFieldsTagLib.groovy:815) at grails.plugin.formfields.FormFieldsTagLib.renderDefaultDisplay(FormFieldsTagLib.groovy:770) at grails.plugin.formfields.FormFieldsTagLib.renderDisplayWidget(FormFieldsTagLib.groovy:441) at grails.plugin.formfields.FormFieldsTagLib$_closure8.doCall(FormFieldsTagLib.groovy:357)

I tried to triangulate the problem, and found out that if I remove the titles property from <f:table> then it works fine. The show/edit views have no problems displaying the titles prop.

Any way to avoid the problem? Shall I file a JIRA?

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.298408 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO