File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
src/java/org/codehaus/groovy/grails/web/plugins/support Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -99,10 +99,10 @@ class WebMetaUtils {
9999 }
100100 }
101101
102+ def newCommandObject = false
102103 if (! commandObject) {
103104 commandObject = paramType. newInstance()
104- ctx. autowireCapableBeanFactory?. autowireBeanProperties(
105- commandObject, AutowireCapableBeanFactory . AUTOWIRE_BY_NAME , false )
105+ newCommandObject = true
106106 commandObjects << commandObject
107107 }
108108
@@ -121,6 +121,11 @@ class WebMetaUtils {
121121 constrainedProperty. getPropertyName()), errors)
122122 }
123123 commandObject. errors = errors
124+
125+ if (newCommandObject) {
126+ ctx. autowireCapableBeanFactory?. autowireBeanProperties(
127+ commandObject, AutowireCapableBeanFactory . AUTOWIRE_BY_NAME , false )
128+ }
124129 }
125130 catch (Exception e) {
126131 throw new ControllerExecutionException (" Error occurred creating command object." , e)
You can’t perform that action at this time.
0 commit comments