Menubar is a horizontal navigation component with drop-down menus that are displayed on mouse over or on clicking.
Menubar features the same common behaviors as every PrimeFaces' menu. It consists of (nested) submenus and menu items that can be built declaratively or programmatically by model.
In this recipe, we will build a declarative menu bar with various commands as nested and direct menu items.
We will create a menu bar as shown in the following screenshot:
The following complete code listing shows
p:menubar with submenus
p:submenu and menu items
p:menuitem inside. For instance, the submenu Create ...