Tapestry 5
  1. Tapestry 5
  2. TAP5-1632

When a submit component does not have a specific id, the default id "submit" collides ont the client side with the HTMLFormElement.submit() method, causing JavaScript errors when the form is submitted

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.3, 5.2.5
    • Fix Version/s: 5.3
    • Component/s: tapestry-core
    • Labels:

      Description

      "cancel" mode of submit component is not submit to server, if we don't give t:id attribute on Submit component.

      Steps to reproduce:
      <t:form t:id="form">
      <t:textfield t:id="testField" t:value="testField" t:validate="required" />
      <t:submit value="normal submit"/>
      <t:submit mode="cancel" value="cancel submit"/>
      </t:form>
      When clicking on "cancel submit", nothing happen (form is not submitted to server).

      --------------------
      Workaround from Josh Canfield is to give t:id attribute on Submit component:
      <t:form t:id="form">
      <t:textfield t:id="testField" t:value="testField" t:validate="required" />
      <t:submit t:id="normalSubmit" value="normal submit"/>
      <t:submit t:id="cancelSubmit" mode="cancel" value="cancel submit"/>
      </t:form>

      --------------------
      This is caused by tapestry gives default id 'submit' to the Submit component.
      Tapestry should never give default id 'submit' to the Submit component to avoid this defect.

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Howard M. Lewis Ship
            Reporter:
            Yohan Yudanara
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development