I’m trying to do a composite component with union of a autoComplete and a dataTable. Like this:
<util:myCustomComp ...>
<p:column>#{item.code}</p:column>
<p:column>#{item.name}</p:column>
</util:myCustomComp>
And in CC file:
<p:autoComplete ...>
<cc:insertChildren /> <!-- Show columns only in autocomplete -->
</p:autoComplete>
<p:dataTable ...>
<cc:insertChildren />
</p:dataTable>
But the second isnt rendered, render only the first and skeep (in autoComplete or in dataTable).
<p:autoComplete ... />
<p:dataTable ...>
<cc:insertChildren /> <!-- Show columns in dataTable -->
</p:dataTable>
You can use cc:insertChildren in a view only once per composite component, otherwise a duplicate id exception will be thrown. Unfortunately there is no way that could work :-(.