title: jsf header navigation menu - template
body: <p>I have template like here:
  <a href="http://www.mkyong.com/jsf2/jsf-2-templating-with-facelets-example/" rel="nofollow">http://www.mkyong.com/jsf2/jsf-2-templating-with-facelets-example/</a></p>
  
  <p>i add menu navigation:</p>
  
  <pre><code>&lt;h:form id="form"&gt;
      &lt;div id="page"&gt;
  
          &lt;div id="header"&gt;
              &lt;ui:insert name="header" &gt;
                  &lt;ui:include src="/pages/template/header.xhtml" /&gt;
              &lt;/ui:insert&gt;
              &lt;f:ajax render="ContentLoader"&gt;
                    &lt;h:commandLink actionListener="#{contentPage.setPage('/pages/first.xhtml')}" value="About Us" /&gt;
                    &lt;h:commandLink actionListener="#{contentPage.setPage('/pages/login.xhtml')}" value="Contact Us" /&gt;
                 &lt;/f:ajax&gt;
          &lt;/div&gt;
          &lt;h:panelGroup id="ContentLoader" &gt;
          &lt;div id="content"&gt;
              &lt;ui:insert name="content" &gt;
                  &lt;ui:include src="#{contentPage.page}" /&gt;
              &lt;/ui:insert&gt;
          &lt;/div&gt;
          &lt;/h:panelGroup&gt;
      &lt;/div&gt;
      &lt;/h:form&gt;
  </code></pre>
  
  <p>links are working fine, but i have problem with redirect content by useing <code>&lt;h:commandButton action="link"&gt;</code> which is in content</p>
  
  <p>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?</p>