[JAVASERVERFACES_SPEC_PUBLIC-951] Unable to map composite component facet to new name Created: 23/Mar/11  Updated: 01/Aug/14

Status: Open
Project: javaserverfaces-spec-public
Component/s: Components/Renderers
Affects Version/s: 2.0, 2.1
Fix Version/s: None

Type: Bug Priority: Major
Reporter: kenpaulsen Assignee: Unassigned
Resolution: Unresolved Votes: 4
Labels: None
Remaining Estimate: 1 day
Time Spent: Not Specified
Original Estimate: 1 day


Status Whiteboard:

size_small importance_large


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:

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

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

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" />



Comment by persapiens [ 06/Nov/11 ]

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


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


" />

My Component (crud):

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

<p:dataTable value="#


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

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

Comment by Manfred Riem [ 13/Feb/12 ]


Have you tried doing the following?

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

Comment by Ed Burns [ 01/Aug/14 ]

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

Comment by Manfred Riem [ 01/Aug/14 ]

Setting priority to Major

Generated at Tue May 05 15:31:23 UTC 2015 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.