You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As the title says the custom controller template is not taken into account when using dynamic scaffolding. I have created a simple project that reproduces this issue. The code works fine when using static scaffolding (the controller logs a message in the index action). In dynamic scaffolding however the code seems to be ignored and no message is logged in the index action.
Here is what i did:
created new project with grails create-app
grails install-templates
created a domain class book
Modified /templates/scaffolding/Controller.groovy to log something in the index action (and activated logging)
grails create-scaffold-controller then run-app and navigate to book/index (using dynamic scaffolding no message is logged. It is interesting to note that the template .gsp files are taken into account for dynamic scaffolding, while that does not seem to be the case for the Controller)
grails generate-controller then run-app and navigate to book/index (using static scaffolding the message is now logged)
I'm having the same problem with grails v3.2.8.
Only the gsp-templates are used, in contradiction to the documentation
In my example the RaceController uses dynamic scaffolding: the corresponding template should show 15 entries in the index-method, but only 10 entries get listed.
The un-dynamic RunnerController has a hard-coded method and 15 entries work.
In grails v2.5.5 the controller-templates were actually used and we customized them to use a session-variable for that:
Any chance of comment from the team? Is this something we might see restored in the future? If not, could you please update the docs and the install-templates script so it doesn't create a controller template which is redundant if we can't use it.
As the title says the custom controller template is not taken into account when using dynamic scaffolding. I have created a simple project that reproduces this issue. The code works fine when using static scaffolding (the controller logs a message in the index action). In dynamic scaffolding however the code seems to be ignored and no message is logged in the index action.
Here is what i did:
I am using Grails 3.1.12, java version "1.8.0_45"
Link to example project
The text was updated successfully, but these errors were encountered: