Javatpoint Logo
Javatpoint Logo

PrimeFaces MenuBar

It is a horizontal navigation component which provides menus options. It is used to collect menus and display that in an organize row.

We can create menubar by using <p:menubar> component in JSF application. Some important attributes are tabled below.

MenuBar Attributes

Attribute Default value Type Description
model null MenuModel It is used to create menus programmatically.
style null String It is used for Inline style of menubar.
styleClass null String It is a style class of menubar.
autoDisplay false Boolean It is used to define whether the first level of submenus will be displayed on mouseover or not.
tabindex 0 String It is used to set position of the element in the tabbing order.
toggleEvent over String Event to toggle the submenus.


Here, in the following example, we are implementing <p:menubar> component. This example contains the following files.

JSF File

// menuBar.xhtml


PrimeFaces MenuBar 1
PrimeFaces MenuBar 2
Next TopicPrimeFaces Stack

Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Trending Technologies

B.Tech / MCA