Dong Liu
May 18th, 2007, 06:18 PM
I know this is a strange request. That is why any suggestion is welcome.
I have AbstractCommandController-derived DisplayStatementController, and SimpleFormController-derived EditStatementController. However, due to special requirement on page design, I would like both controller to access a jsp page EditStatement.jsp. This EditStatement.jsp has to be used by SimpleFormController, so it has <form:form commandName="stmt">.
Now I need to create a command object stmt from database in DisplayStatementController (which derives from AbstractCommandController), and pass this object to EditStatement.jsp and let the <form:form ...> code pick it up as a command object.
I assume that, like Struts, the command object in Spring is passed to jsp pages as an object in request object. However, I could not find it. That is why I cannot impost my object as a command object to the jsp page.
I will read into the source code to get some ideas.
Any suggestion on solution, hint, or hint to source code will be appreciated.
I have AbstractCommandController-derived DisplayStatementController, and SimpleFormController-derived EditStatementController. However, due to special requirement on page design, I would like both controller to access a jsp page EditStatement.jsp. This EditStatement.jsp has to be used by SimpleFormController, so it has <form:form commandName="stmt">.
Now I need to create a command object stmt from database in DisplayStatementController (which derives from AbstractCommandController), and pass this object to EditStatement.jsp and let the <form:form ...> code pick it up as a command object.
I assume that, like Struts, the command object in Spring is passed to jsp pages as an object in request object. However, I could not find it. That is why I cannot impost my object as a command object to the jsp page.
I will read into the source code to get some ideas.
Any suggestion on solution, hint, or hint to source code will be appreciated.