tomtom
Oct 3rd, 2005, 09:02 AM
I'm using a Spring formcontroller with a backing dataobject and a freemarker template with the spring macros for the view.
This basically works, but my problem with bound formdata is, that modifications on the backing dataobject by the controller AFTER binding is done, are not represented in the view! Means: the formfield on the screen holds the value that was submitted/set at the moment of binding, not that eventually set after binding by the controller. E.g. if I want to reset some fieds depending on the values of others in the controller logic, this doesn't work - this fields still show the submitted values, while the backing dataobject holds the correct new values.
Till now I havn't found where this kind of caching happens - obviously somewhere in the BindingContext that is used by the freemarker macros?
I don't think this should be the behaviour of the binding functions, since it makes complex formhandling in conjunction with formbinding nearly impossible. Or have I missed something with binding ?
Thanks for any advice
This basically works, but my problem with bound formdata is, that modifications on the backing dataobject by the controller AFTER binding is done, are not represented in the view! Means: the formfield on the screen holds the value that was submitted/set at the moment of binding, not that eventually set after binding by the controller. E.g. if I want to reset some fieds depending on the values of others in the controller logic, this doesn't work - this fields still show the submitted values, while the backing dataobject holds the correct new values.
Till now I havn't found where this kind of caching happens - obviously somewhere in the BindingContext that is used by the freemarker macros?
I don't think this should be the behaviour of the binding functions, since it makes complex formhandling in conjunction with formbinding nearly impossible. Or have I missed something with binding ?
Thanks for any advice