Hi all.
I’m not sure whether it’s a bug or not, but here’s what I’ve found:
Here is a starting working example – product link:
<prety:link mappingId="product">
<f:param value="#{product.category}"/>
<f:param value="#{product.id}"/>
<!-- more params here -->
<h:outputText value="Link name"/>
</prety:link>
Now I create composite component <test:productLink/>
to simplify my code and avoid multiple inclusions of pretty big pretty links.
<composite:interface>
<composite:attribute name="product" required="true" type="com.Product"/>
</composite:interface>
<composite:implementation>
<prety:link mappingId="product">
<f:param value="#{cc.attrs.product.category}"/>
<f:param value="#{cc.attrs.product.id}"/>
<!-- more params here -->
<composite:insertChildren/>
</prety:link>
</composite:implementation>
And use it that way:
<test:productLink product="#{mybean.product}">
<h:outputText value="Link name"/>
</test:productLink>
I’m using this approach in many components but it fails when it comes to pretty:link. It simply does not insert component’s children via <composite:insertChildren/>
. Is it a bug or feature or what?
Please help.