O'Reilly logo

PrimeFaces Beginner's Guide by K. Siva Prasad Reddy

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action – creating the PanelMenu component

Let us see how to create a PanelMenu component, by performing the following step:

  1. Create the PanelMenu component using <p:panelMenu> and add menuitems and submenus using <p:menuitem> and <p:submenu>:
    <p:panelMenu style="width:200px"> <p:submenu label="User Management"> <p:submenu label="View Users" icon="ui-icon-person"> <p:menuitem value="Moderators" url="#" /> <p:menuitem value="Normal Users" actionListener="#{menuController.showUserManagement()}"/> </p:submenu> </p:submenu> <p:submenu label="Tag Management"> <p:menuitem value="View Tags" url="panelMenu.jsf" icon="ui-icon-tag"/> <p:menuitem value="Tag Stistics" outcome="panelMenu" icon="ui-icon-image"/> </p:submenu> <p:submenu label="System Config" ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required