Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 1.1.1
-
Fix Version/s: None
-
Component/s: Scaffolding
-
Labels:None
-
Environment:JDK 5, Grails 1.1.1, Windows XP 32
Description
A scaffolding controller, that uses an action "foo" works perfectly with any view (e.g. fooView.gsp) or template (_fooView.gsp) when using static scaffolding after generating views and controller using generate-all.
When using dynamic scaffolding, the "foo"action of the controller ALWAYS wants to render a "foo.gsp"-view, so the view or template-arguments of a call to the render-method are ignored.
Dynamic and static scaffolding should always behave identically.
Activity
- All
- Comments
- Work Log
- History
- Activity
- Git Commits
I have the same issue and think it is because of the event when a view is dynamically scaffolded.
E.g. if you have the following actions in templates\scaffolding\Controller.groovy and an existing templates\scaffolding\myaction2.gsp view:
{ render(view: "myaction2") }def myaction =
def myaction2 =
{ return }After application start, calling ../myaction will fail as the view does not exist.
After calling .../myaction2 the first time, the view is scaffolded (and cached somewhere?), and succeeding calls to ../myaction correctly show the myaction2.gsp.
If a static view (views/entity/myaction2.gsp) exists, even the first call to .../myaction is successful, as no dynamic scaffolding is needed.
The "render" function should scaffold views on the fly if they are not yet scaffoled by a controller action.
(Version 1.3.7)