Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 2.0, 2.1
    • Fix Version/s: None
    • Component/s: Components/Renderers
    • Labels:
      None
    • Environment:

      All

    • Status Whiteboard:
      Hide

      size_small importance_large

      Show
      size_small importance_large

      Description

      If you need to map map the public name exposed by a composite component to a different name as required by the consuming component, it is not possible with cc:insertFacet. Here's an example:

      Page:
      <my:component>
      <f:facet name="fooHeader">
      <h:outputText value="foo" />
      </f:facet>
      <f:facet name="barHeader">
      <h:outputText value="bar" />
      </f:facet>
      </my:component>

      Component:
      <cc:implementation>
      ...
      <h:dataTable ...>
      <cc:insertFacet name="fooHeader" />
      ...
      </h:dataTable>
      <h:dataTable ...>
      <cc:insertFacet name="barHeader" />
      </h:dataTable>

      In the example component code above "header" is the required name for h:dataTable. However, to retrieve the outer name, you must use the correct name exposed by the component, "fooHeader" or "barHeader" in this example. The above code will obviously fail to render the headers.

      To solve this, I propose adding "localName" (or something similar) to the insertFacet tag:

      <cc:insertFacet name="barHeader" localName="header" />

      Thanks!

      -Ken

        Activity

        Hide
        Manfred Riem added a comment -

        Setting priority to Major

        Show
        Manfred Riem added a comment - Setting priority to Major
        Hide
        Ed Burns added a comment -

        Set priority to baseline ahead of JSF 2.3 triage. Priorities will be assigned accurately after this exercise.

        Show
        Ed Burns added a comment - Set priority to baseline ahead of JSF 2.3 triage. Priorities will be assigned accurately after this exercise.
        Hide
        Manfred Riem added a comment -

        Ken,

        Have you tried doing the following?

        <cc:implementation>
        <h:dataTable>
        <f:facet name="header">
        <cc:renderFacet name="fooHeader"/>
        </f:facet>
        </h:dataTable>
        </cc:implementation>

        Show
        Manfred Riem added a comment - Ken, Have you tried doing the following? <cc:implementation> <h:dataTable> <f:facet name="header"> <cc:renderFacet name="fooHeader"/> </f:facet> </h:dataTable> </cc:implementation>
        Hide
        persapiens added a comment -

        I have problem to create composite components using cc:renderFacet inside a p:datatable

        Page:

        <sds:crud>
        <f:facet name="listColumns" >
        <p:column >
        <f:facet name="header">
        My column
        </f:facet>
        <h:outputText value="#

        {s}

        " />
        </p:column>
        </f:facet>
        </sds:crud>

        My Component (crud):

        <cc:interface >
        <cc:facet name="listColumns" required="true" />
        </cc:interface>

        <cc:implementation>
        <p:dataTable value="#

        {teste.list()}

        " var="s">
        <cc:renderFacet name="listColumns" />
        </p:dataTable>
        </cc:implementation>

        If I use cc:insertChildren it works, however I need to use facets.

        Show
        persapiens added a comment - I have problem to create composite components using cc:renderFacet inside a p:datatable Page: – <sds:crud> <f:facet name="listColumns" > <p:column > <f:facet name="header"> My column </f:facet> <h:outputText value="# {s} " /> </p:column> </f:facet> </sds:crud> – My Component (crud): – <cc:interface > <cc:facet name="listColumns" required="true" /> </cc:interface> <cc:implementation> <p:dataTable value="# {teste.list()} " var="s"> <cc:renderFacet name="listColumns" /> </p:dataTable> </cc:implementation> – If I use cc:insertChildren it works, however I need to use facets.

          People

          • Assignee:
            Unassigned
            Reporter:
            kenpaulsen
          • Votes:
            4 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:

              Time Tracking

              Estimated:
              Original Estimate - 1 day
              1d
              Remaining:
              Remaining Estimate - 1 day
              1d
              Logged:
              Time Spent - Not Specified
              Not Specified