I was wondering if there is another way of making a certain field of a domain to not appear in the views pages of the dynamic scaffolding capability of Grails?
I can execute the generate-all
command on the domain and edit the view myself but I was just wondering if there is a way for me to still take advantage of the dynamic scaffolding capability.
I just want to not show the password field on the show
and edit
views of my user domain.
I would disagree with Gregg's comment above. Scaffolding is very helpful in reducing unnecessary code.
Add a constraint called display:false
to that 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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With