Announcement Announcement Module
Collapse
No announcement yet.
Probleme trying to manage multiples forms in the same view Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Probleme trying to manage multiples forms in the same view

    Hi,

    I am trying to manage multiples forms in the same views.

    In my view (page.do) :

    Code:
    <form:form modelAttribute="model" action="edit.do" method="post">
    ...
    </form:form>
    <form:form modelAttribute="model2" action="add.do" method="post">
    ...
    </form:form>
    In the first form controller I have :
    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"));
    		}
    	}
    The redirection works, but when there are validation errors, I can't see its.


    Thank you for your help.
Working...
X