Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-3095

Adding AjaxFormSubmitBehavior to Form leads to "Error: too much recursion" JS Error

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.4.12
    • 1.4.13, 1.5-M3
    • wicket
    • None

    Description

      We did an upgrade from 1.4.9 to 1.4.12 and noticed that a custom subclass of Form behaves differently. To submit a form by means of Ajax, we added an AjaxFormSubmitBehavior to the form triggering the "onsubmit" event. This worked until we did the upgrade. Now the javascript error "Error: too much recursion" occurs on submitting the form. This leads to a non-ajax submit of the form. I suspect that the code that AjaxFormSubmitBehavior attaches to the onsubmit event triggers onsubmit again - leading to an infinite loop. We now downgraded to 1.4.10. So the bug may first occur in 1.4.11 - but that version wasn't tested.

      Attachments

        1. recursion.jar
          9 kB
          Michael Sparer

        Issue Links

          Activity

            People

              mgrigorov Martin Tzvetanov Grigorov
              msparer Michael Sparer
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: