Composite JSF: 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 is identifiers, because when I define only my composite component and then add my implementation to it, it only displays 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 display anything. I also need a component because I need to know its client ID.

+3
source share
2 answers

Just clarify:

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

, ?

:

  • renderFacet , insertFacet - , .
  • "<! - β†’ " , .
+2

. , clientId , , NamingContainer.

- : "MyComposition2.xhtml"  ...

"index.faces"

clientId : myC2: myC1:

0

All Articles