I am using primefaces 3.1 with `, having four positions. In the west position(west) I have added tree menu. JSF code is follows
This is achieved with the help of layout. Define layout template for your application. Sample is shown here ...
myLayoutTemplate.xhtml
<p:layout>
<p:layoutUnit position="east" header="Menu" collapsed="true" scrollable="true" collapsible="true" >
<ui:insert name="appMenu">
Place Your menu here ...
</ui:insert>
</p:layoutUnit>
<p:layoutUnit position="center" scrollable="true">
<ui:insert name="pageContent">
Page Content is loaded here .....
</ui:insert>
</p:layoutUnit>
</p:layout>
In Your Page.xhtml which is to be loaded on click of your menu item, .....
<ui:composition template="myLayoutTemplate.xhtml">
<ui:define name="pageContent">
</ui:define>
</ui:composition>
I think that this post will be very useful for you Include one xhtml inside another JSF
It describes how you create a template and then use it in your template client
. @rags already told you that, but you don't really have to use <p:layout>
. Article linked above is just more precise. I believe you will find what you need there. Regards