Announcement Announcement Module
Collapse
No announcement yet.
Question on SimpleFormController Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Question on SimpleFormController

    Hi,

    I've this one particular formController I can never figure out why it doesn't work. When I click on the submit button, it never calls to the OnSubmit function, instead the FormBackingObject gets called.
    When I traced through it, the validator gets called then it goes right to the FormBackingObject function.

    I'm doing this the same way as my other formController. What am I missing on this one? What are the requirement for a binding a form to SimpleFormController?

    Thank you

  • #2
    Submitting only happens when the method of the form is set to POST. Maybe that's the problem? If not, can you check with your other form controller to see what methods you have overridden?

    Alef

    Comment


    • #3
      The form method is set to POST

      I basically used the existing working formController by renaming it and changing the codes inside the function. I can't think of anything tha I'm doing differently. The only thing I could think of that is different is on my jsp form, I have a couple of extra hidden fields. Do I need to have matching form fields with the CommandClass Object properties? I didn't think that was the requirement.

      Comment


      • #4
        No, you don't have to have matching form field perse... But probably the formcontroller is redirecting you to the form view again because it thinks there are errors (probably because binding failed).

        Could you try to override showForm(HttpServletRequest, HttpServletResponse, Errors) and see if there are any errors available?

        Comment

        Working...
        X