(Quick Reference)

5 Scaffolding - Reference Documentation


Version: 2.1.0-SNAPSHOT

5 Scaffolding

Scaffolding templates based on the Fields plugin are quite powerful as they will pick up field and input rendering templates from your application and any plugins that provide them. This means that the useful life of scaffolding templates should be much longer as you do not need to replace the entire create.gsp and/or edit.gsp template just because you want to do something different with a certain property of one particular class.

The plugin makes the renderEditor.template file used by standard Grails scaffolding redundant. This template was very limited because it could not be extended by plugins or applications (only replaced) and was unable to support embedded properties of domain classes.

The Fields plugin includes scaffolding templates you can use in your application by running:

grails install-form-fields-templates

This will overwrite any create.gsp and edit.gsp files you have in src/templates/scaffolding.

Alternatively, it's very easy to modify your existing scaffolding templates to use the f:all tag or multiple f:field tags.