<caveat> Usual please bear with me stuff </caveat>
I have a form (lets call it FormA, in formA.jsp) with a SimpleFormController . namely FormAController.
formA.jsp has a link to another form, formB. FormB (another SimpleFormController) allows me to select a parameter to pass back to formA. This works fine in as much that if I have in FormBController.onSubmit()
{
.......
return new ModelAndView("formA", "myModel", model);
}
I am returned to formA with the correct value selected (ie the one I selected in formB) -but with formB.html in the browser url
However , when I submit formA the form is submitted to the formB controller.
How do I pass control back from FormBController to FormAController ? If I use a RedirectView I lose the the parameter and I get the class info displayed in the browser url
My mappings are:-
<bean id="urlMapping" class="org.springframework.web.servlet.handler.Sim pleUrlHandlerMapping">
<property name="mappings">
<props>
<prop key="/formA.html">formAController</prop>
<prop key="/formB.html">formBController</prop>
</props>
</property>
</bean>
<bean id="viewResolver" class="org.springframework.web.servlet.view.Intern alResourceViewResolver">
<property name="viewClass"><value>org.springframework.web.se rvlet.view.JstlView</value></property>
<property name="prefix"><value>/jsp/</value></property>
<property name="suffix"><value>.jsp</value></property>
</bean>
</beans>


Reply With Quote
