The values are get/set by the order of the interceptor invocations. As long as the action is on the valuestack, after prepare()
the params
interceptor is called getModel()
to get the object whose property should be set.
The modelDriven
interceptor also retrieves model from the valueStack
. Any subsequent searches for the model properties via expression results to call getModel()
while the property isn't set yet. The params
interceptor sets property finally, then validation
interceptor is invoked, which is also retrieves getModel()
to get the property values that should be already set.
The console will look like above. It's a normal behavior of the interceptors until the action is executed.
In the first case you didn't send values with the request, therefore the console prints what has been after prepare()
.
In the second the value is sent and property has been changed, so the console reflected it. Values are coming with the http request, so it's the same "location" in the scope of request.