I have one question regarding to p:tabView. Shall it be inside h:form or not? I have the code below, but the problem is that I use nested layout inside <ui:include src="/views/#{tab.view}.xhtml"/>. According to jQuery Layout reference a form must not enclose any layout. It can be enclosed by layout unit, but not enclose layout itself.
Code: Select all
<h:body>
<ui:insert name="resources"/>
<p:layout id="masterLayout" fullPage="true">
<p:layoutUnit id="masterLayoutCenter" position="center">
<ui:insert name="header"/>
<h:form id="mainNavigationForm">
<p:tabView id="mainNavigationTabView" toggleMode="async" cache="false">
<c:forEach items="#{mainNavigation.tabs}" var="tab">
<p:tab title="#{tab.title}">
<ui:include src="/views/#{tab.view}.xhtml"/>
</p:tab>
</c:forEach>
</p:tabView>
</h:form>
</p:layoutUnit>
<p:layoutUnit id="masterLayoutFooter" position="south" resizable="false" size="23">
<ui:insert name="footer"/>
</p:layoutUnit>
</p:layout>
</h:body>
Thanks.The pane elements must be direct 'children' of the container element - i.e., not nested inside other elements. There is an exception for nesting inside a FORM, or if you use an ID as a selector instead of the default class-selectors.
Oleg.