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

client ID collision

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • 4.1.2
    • 4.1.5
    • Framework
    • None

    Description

      Home.html:

      <span jwcid="@Test" />
      <span jwcid="@Test" />

      Test.html:

      <form jwcid="@Form">
      <input jwcid="@TextField" value="" />
      </form>

      Generated html:

      <form method="post" action="/demo/Home,$Test.$Form.sdirect" id="Form">
      <div style="display:none;" id="Formhidden"><input type="hidden" name="formids" value="TextField" />
      <input type="hidden" name="submitmode" value="" />
      <input type="hidden" name="submitname" value="" />
      </div>
      <input type="text" name="TextField" value="" id="TextField" />
      </form>

      <form method="post" action="/demo/Home,$Test_0.$Form.sdirect" id="Form_0">
      <div style="display:none;" id="Form_0hidden"><input type="hidden" name="formids" value="TextField" />
      <input type="hidden" name="submitmode" value="" />
      <input type="hidden" name="submitname" value="" />
      </div>
      <input type="text" name="TextField" value="" id="TextField" />
      </form>

      Please note that the 2 TextFields have the same ID: "TextField".
      It's not a problem that they have the same name because it is a form-local identifier as a know, but having the same ID causes problems with client side scripting.

      Regards:
      Norbi

      Attachments

        Activity

          People

            jkuhnert Jesse Kuhnert
            snorbi Norbert Sándor
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: