Many of the PrimeFaces menu components such as Menu, TieredMenu, SlideMenu, MegaMenu, MenuBar, TabMenu, PanelMenu, and Breadcrumb are backed by the org.primefaces.model.MenuModel
instance, and can also be created in a declarative way using the same <p:menuitem>
and <p:submenu>
elements.
We can create menus declaratively using the <p:menuitem>
and <p:submenu>
elements. The <p:submenu>
element can be used to group menu options, and submenus can be nested inside other submenus.
The <p:menuitem>
element provides the following options to customize its behavior: