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 a Menubar component

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

  1. Create a Menubar component using <p:menubar> declaratively:
    <p:menubar autoDisplay="false"> <p:submenu label="User Management" icon="ui-icon-person"> <p:menuitem value="Disable/Enable Users" actionListener="#{menuController.showUserManagement()}"/> <p:menuitem value="View User Activity" actionListener="#{menuController.showUserActivity()}" ajax="false"/> </p:submenu> <p:submenu label="Tag Management" icon="ui-icon-tag"> <p:menuitem value="View Tags" url="menubar.jsf"/> <p:menuitem value="Create Tag" outcome="menubar"/> </p:submenu> <p:submenu label="System Config" icon="ui-icon-gear"> <p:submenu label="Global Settings"> ...

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