Uploaded image for project: 'Tapestry 5'
  1. Tapestry 5
  2. TAP5-2274

AjaxFormLoop doesn't work well inside a table tag

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Reopened
    • Major
    • Resolution: Unresolved
    • 5.4
    • None
    • tapestry-core

    Description

      if i use AjaxFormLoop inside a table tag, like this:

      <t:form>

      <table>
      <thead>
      <tr>
      <th>Name 1</th>
      <th>Name 2</th>
      </tr>
      </thead>
      <tbody>
      <tr t:type="AjaxFormLoop" source="personHolderList" encoder="personHolderEncoder" value="personHolder">
      <td><input t:type="TextField" value="personHolder.person.name1"/></td>
      <td><input t:type="TextField" value="personHolder.person.name2"/></td>
      </tr>
      </tbody>
      </table>

      </t:form>

      there is no javascript error thrown.
      here the code rendered by tapestry:

      <form data-validate="submit" action="/tap54test/start.form" method="post" id="form">
          <input value="cYCR+e8VnfSZyMMIKGcs2cKU1F0=:H4sIAAAAAAAAAFvzloEVAN3OqfcEAAAA" name="t:formdata" type="hidden">
          <div data-inject-row-url="/tap54test/start.ajaxformloop:injectrow?t:formcomponentid=Start:form&t:formid=form" data-remove-row-url="/tap54test/start.ajaxformloop:triggerremoverow" data-container-type="core/AjaxFormLoop">
              
          </div>
          <a class="btn btn-default btn-sm" data-afl-trigger="add" href="#">
              <span class="glyphicon glyphicon-plus-sign"></span>Add row
          </a>
          <table>
              <thead>
              <tr>
                  <th>Name 1</th>
                  <th>Name 2</th>
                  <th>Birthday</th>
              </tr>
              </thead>
              <tbody>
              <tr data-afl-behavior="insert-before" data-container-type="core/ajaxformloop-fragment"></tr>
              </tbody>
          </table>
      </form>

      Attachments

        Activity

          People

            hlship Howard Lewis Ship
            shomburg Sven Homburg
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated: