How to hide fields in Grails CRUD dynamic forest viewport?

I was wondering if there is another way to make sure that a certain domain field does not appear on the presentation pages of the Grails feature for dynamically creating forests.

I can run the generate-all command in the domain and edit the view myself, but I was just wondering if there was a way for me to still take advantage of the dynamic capabilities of scaffolding.

I just want to not show the password field on show and edit views of my user domain.

+8
source share
1 answer

I would not agree with Gregg's comment above. Scaffolding is very useful in reducing unnecessary code.

Add a constraint called display:false to this property in your domain class, i.e.

 static constraints { password display: false } 

This will hide the property for you when scaffolding.

Docs: http://www.grails.org/doc/latest/ref/Constraints/Usage.html

+16
source

All Articles