Uploaded image for project: 'MyFaces Trinidad'
  1. MyFaces Trinidad
  2. TRINIDAD-1514

<tr:iterator> does not add index to id

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.2.12-core
    • 1.2.12-core
    • Components
    • None
    • IE7, Trinidad 1.2.11, JSF ri 1.2_12

    Description

      <tr:iterator id="itr" value="#

      {bean.valueList}

      ">

      <f:subview id="subPage">
      <jsp:include page="subPage1.jsp" />
      </f:subview>

      </tr:iterator>

      subPage1.jsp
      -------------------
      <tr:commandLink id="command" ...>

      All the comandLink IDs in the generated html are the same: itr:subPage.command
      Suppose the valueList has 10 elements, 10 commandLinks will be generated. if any command link is clicked, all the 10 bound methods will be executed in server side.

      Indice need to be add to component id under <tr:iterator>. For the example above. IDs should be

      itr:0:subPage.command
      itr:1:subPage.command
      itr:2:subPage.command
      itr:3:subPage.command
      itr:4:subPage.command
      itr:5:subPage.command
      itr:6:subPage.command
      itr:7:subPage.command
      itr:8:subPage.command
      itr:9:subPage.command

      <tr:iterator> inside <tr:iterator> has the same problem.

      Attachments

        1. TRINIDAD-1514.tar.bz2
          2 kB
          Andrew Robinson

        Activity

          People

            arobinson74 Andrew Robinson
            javaone9 Dave
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: