I am new To JSf Technology and am creating a system where by am using primefaces. I am using Layoutunit in primefaces and I have left,north and south layoutunit. I want my menus to be on the west layout unit and the content to be in the center unit. I want when a menu is clicked to load corresponding jsf page to the center layout. How can I achieve this? here is my sample code.
<p:layout fullPage="true">
<p:layoutUnit position="north">
<p>Header Here</p>
</p:layoutUnit>
<p:layoutUnit position="west">
<p:menu >
<p:submenu label="Application" icon="ui-icon-refresh">
<p:menuitem value="Page One"
ajax="false"
actionListener="#{bean.setPage('page2')}" />
<p:menuitem value="Page Two"
ajax="false"
actionListener="#{bean.setPage('page1')}"/>
</p:submenu>
</p:menu>
</p:layoutUnit>
<p:layoutUnit position="center">
<p>Content Here</p>
</p:layoutUnit>
</p:layout>