I have template like here: http://www.mkyong.com/jsf2/jsf-2-templating-with-facelets-example/
i add menu navigation:
<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>
links are working fine, but i have problem with redirect content by useing <h:commandButton action="link"> which is in content
how can i fix this problem? maybe it's something wrong with my layout? or how to correctly redirect from content to another content, useing buttons which are in contents?
 
     
    