title: how to set menubar in all pages in jsf
body: <p>I created a menubar and i want it it all my pages throughout application.When i include the file in other through  the menubar state(i.e the submenu is unfolder) dosent maintain.So i created a panel and on click only the pagecontent get refreshed and the menu remain stable.The link dosent change i.e my main page is menubar on click of menu1 also my url is menubar only .</p>
  
  <pre><code>&lt;h:panelGrid columns="2"&gt;
  &lt;h:panelGroup id="menu" layout="block"&gt;
      &lt;h:form id= "form"&gt;
  
      &lt;h:outputStylesheet name="css/primefaces.css" /&gt;
  
      &lt;p:growl id="messages" autoUpdate="true" /&gt;
      &lt;p:panelMenu style="width:200px " styleClass="ui-menubar"
          autoSubmenuDisplay="true"&gt;
  
  &lt;p:submenu label="Ajax     Menuitems"&gt;                      
  &lt;p:menuitem value="Menu1" action ="#{menuBar.setPage('menu1.xhtml')}" /&gt;  
  
          &lt;/p:submenu&gt;    
  
  
  
      &lt;/p:panelMenu&gt;
  
  
     &lt;/h:form&gt;
     &lt;/h:panelGroup&gt;
  
      &lt;h:panelGroup id="content" layout="block" &gt;
     &lt;form id = "contentform"&gt;
      &lt;ui:include src="#{menuBar.page}" /&gt;
      &lt;/form&gt;
          &lt;/h:panelGroup&gt;
        &lt;/h:panelGrid&gt;
  
        &lt;h:panelGroup id="footer" layout="block"&gt;
        &lt;h1&gt;Footer&lt;/h1&gt;
      &lt;/h:panelGroup&gt;
  </code></pre>
  
  <p>Whether there is any alternate ways other than this?</p>