javaserverfaces
  1. javaserverfaces
  2. JAVASERVERFACES-1679

UIViewRoot.addComponentResources() assumes component ids are unique

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Trivial Trivial
    • Resolution: Incomplete
    • Affects Version/s: 2.0.1
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

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

      size_medium importance_medium

      Show
      size_medium importance_medium
    • Tags:

      Description

      Encountered while analyzing the following thread:

      http://mail-archives.apache.org/mod_mbox/myfaces-
      dev/201005.mbox/%3c4BF34C9E.3010108@oracle.com%3e

      UIViewRoot.addComponentResources() checks to see whether a resource has already been added by
      comparing ids:

      List<UIComponent> facetChildren = getComponentResources(context,
      target,
      true);
      String id = componentResource.getId();
      if (id != null) {
      for (UIComponent c : facetChildren) {
      if (id.equals(c.getId()))

      { facetChildren.remove(c); }

      }
      }

      This, however, assumes that component ids are unique across the page, whereas component ids only
      need to be unique for each naming container. As a result, if the same id is used for different resources
      coming from different naming containers, this code will result in non-obvious failures.

        Activity

        Hide
        Ed Burns added a comment -

        Add adf keyword.

        Show
        Ed Burns added a comment - Add adf keyword.
        Hide
        Ed Burns added a comment -

        triage

        Show
        Ed Burns added a comment - triage
        Hide
        Ed Burns added a comment -

        Bulk assign all impl issues to Roger.

        Show
        Ed Burns added a comment - Bulk assign all impl issues to Roger.
        Hide
        Manfred Riem added a comment -

        Can you please attach an example application (with sources) that demonstrates the problem?

        Show
        Manfred Riem added a comment - Can you please attach an example application (with sources) that demonstrates the problem?
        Hide
        Manfred Riem added a comment -

        Lowering priority because of no response

        Show
        Manfred Riem added a comment - Lowering priority because of no response
        Hide
        Manfred Riem added a comment -

        Lowering priority because of no response

        Show
        Manfred Riem added a comment - Lowering priority because of no response
        Hide
        Manfred Riem added a comment -

        Closing because of inactivity

        Show
        Manfred Riem added a comment - Closing because of inactivity

          People

          • Assignee:
            Unassigned
            Reporter:
            aschwart
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: