javaserverfaces
  1. javaserverfaces
  2. JAVASERVERFACES-1527

Facelets: Duplicate lclient Ids for components 'stamped' by c:ForEach

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.1
    • Fix Version/s: 2.1_gf31_m4
    • Component/s: facelets
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      1,527
    • Status Whiteboard:
      Hide

      size_medium importance_large

      Show
      size_medium importance_large

      Description

      If you repeat a component with c:forEach in Facelets, the current implementation
      does not ensure that component's client Id is unique when Id is supplied as a
      literal. Consider the following example:

      <c:forEach var="person" items="$

      {people.people}

      ">
      <h:inputText id="item1" value=#

      {person.name}

      />
      </c:forEach>

      This will produce duplicate client Ids with Facelets, but not with JSP.
      If the id attribute is not specified, the unique Ids are generated.
      While I understand that specifying literal Ids on the stamped components appears
      to be a corner case (the client Ids will be impossible to predict anyways), we
      have a real use case where component's Id attribute is used for integration with
      an external content customization solution.

      1. changebundle.txt
        8 kB
        rogerk
      2. foreach.diff
        5 kB
        mst_70

        Issue Links

          Activity

          No work has yet been logged on this issue.

            People

            • Assignee:
              rogerk
              Reporter:
              mst_70
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: