Reputation: 25156
Is there any way to make some fields of a domain invisible in dynamic scaffolding view?
Upvotes: 2
Views: 1132
Reputation: 31280
Another option would be to use the Fields plugin and override the notToDisplay
field with an empty template so that it doesn't get displayed. This is a bit cleaner, since it doesn't pollute your domain layer with view-specific stuff.
Upvotes: 1
Reputation: 25156
I found it myself:
We can use the display
constraint to achieve this.
source : http://grails.org/doc/latest/ref/Constraints/Usage.html
class {
String notToDisplay
...
static constraints = {
...
notToDisplay(display:false)
}
}
Upvotes: 9