View Full Version : Is a way passing a message to the successView?
vw729
Apr 29th, 2005, 12:39 AM
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.
katentim
Apr 29th, 2005, 12:56 AM
Just add the message to the model map.
model.put("saveSuccessful", new Boolean(true));
return new ModelAndView(getSuccessView(), model);
Take a look at this thread (http://forum.springframework.org/viewtopic.php?t=5127) for some sample code (except returning to the original form).
vw729
Apr 29th, 2005, 12:16 PM
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?
vBulletin® v3.7.3, Copyright ©2000-2008, Jelsoft Enterprises Ltd.