webtier@glassfish.java.net

JSF2: problem using custom component with facets

From: <webtier_at_javadesktop.org>
Date: Wed, 19 Aug 2009 05:18:40 PDT

I'm unsure how to use facets in custom components. If I'm interpreting the spec correctly, you should declare the available facets in the <composite:interface> section of the component.

[code]
<composite:interface>
  <composite:facet name="test"/>
</composite:interface>
[/code]

And then use the <insertFacet> tag in the <composite:implementation> section.

[code]
<composite:implementation>
  <h:panelGroup>
    <composite:insertFacet name="test"/>
  </h:panelGroup>
</composite:implementation>
[/code]

However, when I try to use this component with a facet, the facet is not shown in the output.

[code]
<ez:comp>
  <f:facet name="test">
      <h:outputText value="foo"/>
  </f:facet>
</ez:comp>
[/code]

Is there more to it?
[Message sent by forum member 'janderssn' (janderssn)]

http://forums.java.net/jive/thread.jspa?messageID=361148