Announcement Announcement Module
Collapse
No announcement yet.
Data for dynamic menus on formView Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Data for dynamic menus on formView

    I want to display a form that has a couple of dynamically built menus and I want to use the
    same form for both formView and successView. I can build the lists that drive menu
    construction in the onSubmit method and pass them to the jsp via the ModelAndView return
    object for a POST but I can't see how this is done for a GET where Spring just wants to pass a form
    back to the UI.

    How do I build the objects that will be used to create the menus for a GET and associate them
    with the formView?

    Thanks for any help or advice,
    -=beeky

  • #2
    Override isFormSubmission(HttpServletRequest request)...

    ... assuming you've extended SimpleFormController.

    By default get request do not call onSubmit. Just get this method to return true and onSubmit would be called.

    Alternatively you could override referenceData(HttpServletRequest request) and build your menu lists in there as this always gets called.

    Comment

    Working...
    X