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 MegaMenu with multiple columns

Let us see how to create a multicolumn menu using the MegaMenu component, by performing the following step:

  1. Create the MegaMenu component with multiple columns using <p:column> to group the menu options into a column:
    <p:megaMenu> <p:submenu label="Users"> <p:column> <p:submenu label="Normal Users"> <p:menuitem value="View Users" url="#"/> <p:menuitem value="User Activity" url="#"/> </p:submenu> <p:submenu label="Inactive Users"> <p:menuitem value="View Inactive Users" url="#"/> <p:menuitem value="Unlock Users" url="#"/> </p:submenu> </p:column> <p:column> <p:submenu label="Moderators"> <p:menuitem value="View Moderators" url="#"/> <p:menuitem value="Deleted Buzz" url="#"/> </p:submenu> </p:column> ...

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