Reputation: 900
Using Tomcat 7.0.34, Primefaces 3.5 and mojarra 2.1.25 I have the following file "client.xhtml":
<ui:composition template="/templates/Template.xhtml"
xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html"
xmlns:ui="http://java.sun.com/jsf/facelets">
<ui:define name="template_conteudo">
<h:form id="formDadosCliente">
<ui:include src="/client.inc"/>
</h:form>
</ui:define>
</ui:composition>
The file client.inc (which is a normal xhtml, and is use in several xhtml files) is the following: (simplified)
<ui:fragment xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core" xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:p="http://primefaces.org/ui">
<p:tabView>
<p:tab title="Client Info">
// Client info stuff
</p:tab>
<ui:include src="clientBilling.inc"/>
</p:tabView>
</ui:fragment>
and the "clientBilling.inc": (which I use in several other xhtml files)
<p:tab title="other tab">
</p:tab>
<p:tab title="another tab">
</p:tab>
The tabs from the "clientBilling.inc" are not showing, but the content is shown if I take it off the p:tabView.
Upvotes: 0
Views: 1416
Reputation: 96
Just stumpled across this old question with no answer and i like to try...
I get this working when adding a few lines in clientBilling.inc:
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:p="http://primefaces.org/ui">
<p:tab title="other tab">
</p:tab>
<p:tab title="another tab">
</p:tab>
</ui:composition>
Upvotes: 2