ICEfaces-EE
  1. ICEfaces-EE
  2. IPCK-127

ICEfaces 2.0 composite components "id" attribute being injected into the page instead of passed through

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Invalid
    • Affects Version/s: None
    • Fix Version/s: EE-3.0.0.GA
    • Component/s: Facelet Components
    • Labels:
      None
    • Environment:
      ICEfaces 2.0 Beta 1, JSF 2.0.3, Glassfish 3.0.1, JDK 6.x

      Description

      When using a JSF 2.0 composite component that has an "id" attribute, the id will be rendered into the page instead of just passed through to the component. For example:

      <div id="parentCon">
       <ice-cc:filterTable id="ourTable" bean="..."/>
      </div>

      Then the component code itself:

      ...
      <ice:dataTable id="#{cc.attrs.id}"...
      ...

      We would expect the id of the composite component dataTable to be "parentCon:ourTable". Instead it appears to render as "parentCon:ourTable:ourTable", because the id of the filterTable composite component is being rendered into the page as well. Basically "id" looks like a reserved name that can't be freely used as a composite component attribute.

      To workaround you could use a different attribute name, for example 'fakeId="ourTable"' would properly render in the above example as "parentCon:ourTable". This breaks backwards compatibility and is more confusing for a user to work with.

      Also note this issue causes problems for components that rely on id, such as the "for" of a dataPaginator.

        Activity

        Carlo Guglielmin created issue -
        Carlo Guglielmin made changes -
        Field Original Value New Value
        Assignee Brad Kroeger [ brad.kroeger ] Ken Fyten [ ken.fyten ]
        Patrick Corless made changes -
        Salesforce Case []
        Fix Version/s EE-2.0.0.Beta1 [ 10254 ]
        Patrick Corless made changes -
        Assignee Ken Fyten [ ken.fyten ] Patrick Corless [ patrick.corless ]
        Patrick Corless made changes -
        Salesforce Case []
        Fix Version/s EE-2.0.0.Beta2 [ 10256 ]
        Fix Version/s EE-2.0.0.Beta1 [ 10254 ]
        Ken Fyten made changes -
        Fix Version/s EE-2.0.0.Beta1 [ 10254 ]
        Fix Version/s EE-2.0.0 [ 10256 ]
        Ken Fyten made changes -
        Salesforce Case []
        Fix Version/s EE-2.1.0 [ 10261 ]
        Fix Version/s EE-2.0.0.Beta1 [ 10254 ]
        Hide
        Philip Breau added a comment -

        In JSF 2 Components, the id 'attribute' is inherent, but not considered an attribute. That means you don't have to declare it, and you can access either by #

        {cc.id}

        (note, not accessed through the cc.attrs property) and #

        {cc.clientId}

        properties.

        Show
        Philip Breau added a comment - In JSF 2 Components, the id 'attribute' is inherent, but not considered an attribute. That means you don't have to declare it, and you can access either by # {cc.id} (note, not accessed through the cc.attrs property) and # {cc.clientId} properties.
        Philip Breau made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Invalid [ 6 ]
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Patrick Corless
            Reporter:
            Carlo Guglielmin
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: