Hi,
I am trying to manage multiples forms in the same views.
In my view (page.do) :
In the first form controller I have :Code:<form:form modelAttribute="model" action="edit.do" method="post"> ... </form:form> <form:form modelAttribute="model2" action="add.do" method="post"> ... </form:form>
The redirection works, but when there are validation errors, I can't see its.Code:@RequestMapping("edit.do") public ModelAndView processAccountSubmit(@ModelAttribute("model") MyModel model, BindingResult result, SessionStatus status) { new EditFormValidator().validate(model, result); if (result.hasErrors()) { return new ModelAndView(new RedirectView("page.do")); } return new ModelAndView(new RedirectView("good.do")); } }
Thank you for your help.


Reply With Quote