Uploaded image for project: 'Tapestry'
  1. Tapestry
  2. TAPESTRY-1775

Multiple submit buttons inside async form can invoke incorrect listener

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.1.3
    • Fix Version/s: 4.1.5
    • Component/s: Framework, JavaScript
    • Labels:
      None

      Description

      ... this can happen when the updateComponents of the buttons doesnt cover the form.

      So, in such a case, when button1 is clicked it sets itself as tapestry.forms.form['Form'].clickedButton
      and correctly does the async form submit.
      However, the xhr response does NOT include any calls to tapestry.form.registerForm since (as stated)
      updateComponents may not really include the whole form. So, what this means is that the old value for
      tapestry.forms.form['Form'].clickedButton remains - triggering the associated listener no matter how the
      new form is submitted.

        Attachments

        1. form.js.diff
          2 kB
          Francesco Degrassi

          Activity

            People

            • Assignee:
              andyhot Andreas Andreou
              Reporter:
              andyhot Andreas Andreou
            • Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: