Time for action – creating ContextMenu
Let us see how to create a page-level and component-level ContextMenu, by performing the following steps:
- 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/"/>...