Reputation: 1948
The new book 'Grails In Action' 2nd edition advises that there are two ways to customize the scaffolded views.
■ Expose the scaffolding templates
■ Generate the physical code for all your scaffolding controllers
What didn't become clear to me is that are these two techniques in lieu of each other or can one chose to use them together?
Upvotes: 0
Views: 197
Reputation: 24776
Of course you can use them together. You can always install templates
and modify the templates, keeping dynamic or static scaffolding for some controllers and views and then using the generate-*
commands to generate the code for other views and controllers.
The only thing to keep in mind is that any modifications you make to the results from the generate-*
commands will be overwritten if you regenerate them because you have updated the scaffolding templates.
It's not uncommon to customize the templates to meet your projects needs and then slowly generate views and controllers as the needs evolve beyond the scaffolding templates.
Upvotes: 1