我正在使用Faclet模板技術(shù)在我正在開發(fā)的JSF 2應(yīng)用程序中布局我的頁面。在我的head er.xhtml中,PrimeFaces要求把menubar用h:form括起來。<h:form>
<p:menubar autoSubmenuDisplay="true">
Menu Items here! </p:menubar></h:form>因此,在我的內(nèi)容頁面中,我將有另一個(gè)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>實(shí)際上,我在考慮一個(gè)用例,在這個(gè)用例中,我需要一個(gè)頁面中的多個(gè)h:form。謝謝如何在JSF頁面中使用<h:form>?單一表格?多種形式?嵌套表單?
如何在JSF頁面中使用<h:form>?單一表格?多種形式?嵌套表單?
Smart貓小萌
2019-06-17 17:40:47