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 ContextMenu

Let us see how to create a page-level and component-level ContextMenu, by performing the following steps:

  1. Create a ContextMenu component with menu options using <p:menuitem> and <p:submenu>:
    <p:contextMenu> <p:submenu label="PrimeFaces"> <p:menuitem value="Website" url="http://www.primefaces.org"/> <p:menuitem value="Showcase" url="http://www.primefaces.org/showcase/ui/home.jsf"/> <p:menuitem value="Forum" url="http://forum.primefaces.org/"/> <p:menuitem value="IssueTracker" url="http://www.primefaces.org/issuetracker.html"/> </p:submenu> <p:submenu label="jQuery"> <p:menuitem value="jQuery" url="http://jquery.com/"/> <p:menuitem value="jQueryUI" url="http://jqueryui.com/"/> </p:submenu> <p:menuitem value="JSF" ...

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