我有这样的模板: http ://www.mkyong.com/jsf2/jsf-2-templating-with-facelets-example/
我添加菜单导航:
<h:form id="form">
<div id="page">
<div id="header">
<ui:insert name="header" >
<ui:include src="/pages/template/header.xhtml" />
</ui:insert>
<f:ajax render="ContentLoader">
<h:commandLink actionListener="#{contentPage.setPage('/pages/first.xhtml')}" value="About Us" />
<h:commandLink actionListener="#{contentPage.setPage('/pages/login.xhtml')}" value="Contact Us" />
</f:ajax>
</div>
<h:panelGroup id="ContentLoader" >
<div id="content">
<ui:insert name="content" >
<ui:include src="#{contentPage.page}" />
</ui:insert>
</div>
</h:panelGroup>
</div>
</h:form>
<h:commandButton action="link">
链接工作正常,但我使用内容中的内容重定向内容有问题
我该如何解决这个问题?也许我的布局有问题?或者如何使用内容中的按钮正确地从内容重定向到另一个内容?