- a composite component definition which has one facet named "firstfacet" under library "test" and tag name "component".
- A facelet fragment "test/fragment.xhtml" I want to use facet.
First, I create the composite component.
Then I create myfacet component
Finally, I attach the created fragment as facet to composite component.
The advantage of this apporach: you do not need to worry about temporary file generation and path translation for fragment file.
The disadvantage of this approach: for each facet NAME, you can only attach one component.