I hava a composite component with a PrimeFaces dataTable inside. The column definition should be done outside of this component in a facet definition.
<composite:interface>
<composite:attribute name="domains" required="true"/>
<composite:facet name="domainColumns" required="true"/>
</composite:interface>
<composite:implementation>
<p:dataTable var="var" value="#{cc.attrs.domains}">
<composite:renderFacet name="domainColumns"/>
</p:dataTable>
</composite:implementation>
I want to use this component like shown here:
<my:domainTable domains="#{adminTsWorkspaceBean.domains}">
<f:facet name="domainColumns">
<p:column headerText="Header">
<h:outputText value="#{var.id}" />
</p:column>
</f:facet>
</my:domainTable>
Interestingly: If I use the p:column
as a child and not as a facet and then in my component <composite:insertChildren/>
, I have the desired output. But of course I can insert the children only at one position in my component. I'm trying to define the column for two different dataTables?