Announcement Announcement Module
Collapse
No announcement yet.
Is a way passing a message to the successView? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Is a way passing a message to the successView?

    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.

  • #2
    Just add the message to the model map.
    Code:
    model.put("saveSuccessful", new Boolean(true));
    return new ModelAndView(getSuccessView(), model);
    Take a look at this thread for some sample code (except returning to the original form).

    Comment


    • #3
      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?

      Comment

      Working...
      X