How I can pass a message to the successView of a SimpleFormController? If that is workable, I can have one successView for multiple form controllers.
Printable View
How I can pass a message to the successView of a SimpleFormController? If that is workable, I can have one successView for multiple form controllers.
Just add the message to the model map.
Take a look at this thread for some sample code (except returning to the original form).Code:model.put("saveSuccessful", new Boolean(true));
return new ModelAndView(getSuccessView(), model);
Thanks very much Katentim for your information.
Inside of the
protected ModelAndView onSubmit(HttpServletRequest request,
HttpServletResponse response, Object command, BindException errors)
method, a successful procedure will lead to call its super class method. Is it safe of returning a new instance of ModelAndView instead?