Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JSF composite:insertFacet and composite:renderFacet

I want to have a composite component with a facet in it, which I implement in my "implementation" of this composite component. My problem are ids, because when I only define in my composite component and then with put my implementation in it, it only renders it but the component is in another place. Here is a sample code:

myComposition.xhtml

<composite:implementation>
 <composite:renderFacet name="myFacet">
</composite:implementation>

myCompositionImpl.xhtml

<mySomething:myComposition>
 <f:facet name="myFacet">
  this code is rendered but the "component" which I define here is not placed 
  logically in the place where I defined the "renderFacet". 
 </f:facet>
</mySomething:myComposition>

What can I do about this? With composite:insertFacet it doesn't render anything. I need to have the component also there because I need to know the client id of it.

like image 864
Null Avatar asked Feb 18 '26 11:02

Null


1 Answers

Just to clarify:

Did you specify <cc:facet name="myFacet"> within the interface of the component?

Furthermore what exactly do you mean with in another place?

Some tips:

  • renderFacet is correct, insertFacet is for facets defined within the composite itself.
  • Try adding "<!-- -->" as the first line of content of your facet, this suppose to be a workaround for a bug regarding single line facet content.
like image 54
Robbert Avatar answered Feb 21 '26 15:02

Robbert



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!