The ContextMenu component can be used to display an overlay menu on the mouse's right-click event. Optionally, we can attach ContextMenu to any JSF component and contain nested submenus and menuitems. If you don't specify any particular JSF component, ContextMenu will be attached to the entire page, meaning right-clicking anywhere on the page will display the same ContextMenu.
The ContextMenu component provides the following attributes to customize its behavior:
for: ID of the component to attach to.
event: Event to bind the ContextMenu display, default is
contextmenu, which means right-click.
model: The MenuModel instance to create menu programmatically.
nodeType: Specific type of Tree nodes to attach to.
beforeShow: Client-side ...