dkane
Apr 2nd, 2008, 11:46 AM
Dear colleagues,
This is my first Spring MVC app, and the purpose is to make form backed by session-scoped object. That means having last submitted state of object fields displayed in form fields every time when user opens this form , with no depend on previous navigation path.
I found that "sessionForm" property works only when the same form is re-shown after submission of itself, e.g. in case of errors. When submission leads to other view, backing object is being removed from session. If I open form in question again, fields are empty.
The solution I am using is keeping object in session as Spring bean and retrieving it "manually" from session in Controller's formBackingObject method.
The only thing I'd like to know : was such approach expected by Spring developers, or some "configurable" way to set up backing session bean still exist ?
Thank you !
This is my first Spring MVC app, and the purpose is to make form backed by session-scoped object. That means having last submitted state of object fields displayed in form fields every time when user opens this form , with no depend on previous navigation path.
I found that "sessionForm" property works only when the same form is re-shown after submission of itself, e.g. in case of errors. When submission leads to other view, backing object is being removed from session. If I open form in question again, fields are empty.
The solution I am using is keeping object in session as Spring bean and retrieving it "manually" from session in Controller's formBackingObject method.
The only thing I'd like to know : was such approach expected by Spring developers, or some "configurable" way to set up backing session bean still exist ?
Thank you !