Details
-
Type:
Improvement
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: None
-
Labels:None
-
Patch Submitted:Yes
Description
The current Scaffolding generator binds the renderEditor.template when generating views.
This template is called from the create and edit gsp's.
This functionality is limited to share common code for editors and it's not possible to have other common code in the generation process.
In the XTemplates plugin I had solved this limitiion by binding a Helper.groovy class instead of the renderEditor.template in both the generateView and generateController process.
This makes it's easy to have common code to be called when generating views and controller.
I've attached a small patch for this.
New file: Helper.groovy
Changed files: create.gsp and edit.gsp
Obsolete file: renderEditor.template
I've tested it with both static and dynamic scaffolding in dev and war mode
Issue Links
- relates to
-
GPSCAFFOLD-20
View Template Files - Dynamic Identification
-
Hmm, ok but Helper.groovy currently does not reflect the same functionality as renderEditor.template in the 1.1 SVN branch (it is missing many-to-many handling etc.)