I have created a custom facelets tag file, but I'm struggeling to insert something into it. This is the tag:
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ui="http://java.sun.com/jsf/facelets">
<h1>TestTag</h1>
<ui:insert name="foo"/>
</ui:composition>
This is how I expect to use it:
<ds:testtag>
<ui:define name="foo">
<h2>TestInsert</h2>
</ui:define>
</ds:testtag>
Of course, I have created a taglib file and registered it in web.xml. The ds: namespace is also declared in the file where I want to use the tag.
On the rendered result I can see the TestTag caption from the tag itself, but not the inserted TestInsert.
The answer to this question How to create a custom Facelets tag? as well as a comment here How to create a composite component for a datatable column? suggests that it is possible to insert something into a tag; unfortunately, I couldn't find a working example. What am I missing?