Announcement Announcement Module
Collapse
No announcement yet.
Getting command object in SimpleFormController Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Getting command object in SimpleFormController

    My SimpleFormController currently overide

    Object formBackingObject(HttpServletRequest request) throws Exception;

    and

    protected Map referenceData(HttpServletRequest request) throws Exception;

    I'd like to choose differents modelAndViews to return. The choice of the model is based on my command object.
    I tried to overhide :
    ModelAndView showForm(HttpServletRequest request, HttpServletResponse response, BindException exception) throws Exception

    but when I do : getCommand(request)
    I get the Exception : org.springframework.web.HttpSessionRequiredExcepti on: Form object not found in session (in session-form mode)

    Note : If I delete the showForm overhide, my form works fine.
    Thx for your help

  • #2
    I think you should post your code.

    But have you tried to set

    sessionForm = true when configuring your controller

    http://forum.springframework.org/arc...p/t-20049.html

    Comment


    • #3
      I think you should post your code.

      But have you tried to set

      sessionForm = true when configuring your controller
      Yes, it works. thx a lot !

      Comment

      Working...
      X