File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
grails-scaffolding/src/main/groovy/grails/plugin/scaffolding Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -218,9 +218,15 @@ class ScaffoldingViewResolver extends GroovyPageViewResolver implements Resource
218218 def scaffoldValue = controllerClass. getPropertyValue(' scaffold' )
219219 if (! scaffoldValue) {
220220 Scaffold scaffoldAnnotation = controllerClazz?. getAnnotation(Scaffold )
221- scaffoldValue = scaffoldAnnotation?. domain()
222- if (scaffoldValue == Void ) {
223- scaffoldValue = null
221+ if (scaffoldAnnotation) {
222+ // Check domain() attribute for view scaffolding - domain class is required for model generation.
223+ // Note: For @Scaffold(RestfulServiceController<T>), the AST transformation
224+ // (ScaffoldingControllerInjector) extracts T and sets it as domain() at compile time,
225+ // so this works for both @Scaffold(domain = User) and @Scaffold(RestfulServiceController<User>).
226+ scaffoldValue = scaffoldAnnotation. domain()
227+ if (scaffoldValue == Void ) {
228+ scaffoldValue = null
229+ }
224230 }
225231 }
226232
You can’t perform that action at this time.
0 commit comments