我正在使用Facelet模板技术来布局我正在开发的JSF 2应用程序中的页面。
在我的header.xhtml文件中,primefaces要求将menubar放在h:form标签内。
<h:form>
<p:menubar autoSubmenuDisplay="true">
Menu Items here!
</p:menubar>
</h:form>
因此,在我的内容页面中,我将有另一个h:form或更多。
如果我只是将h:form放在template.xhtml中,它会起作用吗?
<h:body>
<h:form>
<div id="top">
<ui:insert name="header"><ui:include src="sections/header.xhtml"/></ui:insert>
</div>
<div>
<div id="left">
<ui:insert name="sidebar"><ui:include src="sections/sidebar.xhtml"/></ui:insert>
</div>
<div id="content" class="left_content">
<ui:insert name="content">Content</ui:insert>
</div>
</div>
<div id="bottom">
<ui:insert name="footer"><ui:include src="sections/footer.xhtml"/></ui:insert>
</div>
<h:form>
</h:body>
我实际上在考虑一个需要在页面中使用多个h:form的用例。
谢谢
ajax="false"
)。不确定MenuBar
是否适用,但例如TabView
是可以使用的。 - djmj