0
使用Tomcat 7.0.34,Primefaces 3.5和鑽嘴魚科2.1.25 我有以下文件 「client.xhtml」:用戶界面:包括內TabView的另一個用戶界面:包括
<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>
文件client.inc (這是一個正常的XHTML,並且在幾個XHTML文件使用)是下面的:(簡化的)
<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>
和「clientBilling.inc」:(我在使用幾種其他XHTML文件)
<p:tab title="other tab">
</p:tab>
<p:tab title="another tab">
</p:tab>
「clientBilling.inc」中的選項卡未顯示,但如果將其從p:tabView中取消,則會顯示內容。