O'Reilly logo

PrimeFaces Cookbook - Second Edition by Oleg Varaksin, Mert Çalışkan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Accessing commands via menubar

Menubar is a horizontal navigation component with drop-down menus that are displayed on mouseover or on clicking. Menubar features the same common behaviors as every PrimeFaces menu. It consists of (nested) submenus, menu items, and custom content that can be built declaratively or programmatically by modeling.

In this recipe, we will build a declarative menu bar with various commands as nested and direct menu items. The possibility of including any custom content, such as input, select, and button components, will be illustrated as well.

How to do it…

We will create a menu bar as shown in the following screenshot.

How to do it…

In ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required