- The Menu bar and the page to redirect to are in the same portlet
If the menu bar is in the JSF portlet, you have only to define a JSF navigation-rule in your faces-config.xml file to navigate to the new view.
For example, consider that home.xhtml is the main portlet view (default portlet view) and that doAction() is the method in the managedBean that handle the click on the menu.
public String doAction() {
return "go_to_page";
}
and in the faces-config.xml
<navigation-rule>
<from-view-id>home.xhtml</from-view-id>
<navigation-case>
<from-outcome>go_to_page</from-outcome>
<to-view-id>page.xhtml</to-view-id>
</navigation-case>
</navigation-rule>
- The Menu bar and the page to redirect to are not in the same portlet
But if the menu is in another portlet and you don't want to redirect, you have to use IPC (inter portlet communication) to change the view of the JSF Portlet. I wrote this tutorial that may help you to perform the IPC between JSF portlets.