JBoss.orgCommunity Documentation

Chapter 13. Menus and toolbars

13.1. <rich:dropDownMenu>
13.1.1. Basic usage
13.1.2. Menu content
13.1.3. Expanding and collapsing the menu
13.1.4. Reference data
13.2. Menu sub-components
13.2.1. <rich:menuItem>
13.2.2. <rich:menuGroup>
13.2.3. <rich:menuSeparator>
13.3. <rich:panelMenu>
13.3.1. Basic usage
13.3.2. Interactivity options
13.3.3. Appearance
13.3.4. Submission modes
13.3.5. Reference data
13.3.6. <rich:panelMenuGroup>
13.3.7. <rich:panelMenuItem>
13.4. <rich:toolbar>
13.4.1. Basic usage
13.4.2. Appearance
13.4.3. Grouping items
13.4.4. Reference data
13.4.5. <rich:toolbarGroup>

Documentation in development

Some concepts covered in this chapter may refer to the previous version of Richfaces, version 3.3.3. This chapter is scheduled for review to ensure all information is up to date.

Read this chapter for details on menu and toolbar components.

The <rich:dropDownMenu> component is used for creating a drop-down, hierarchical menu. It can be used with the <rich:toolbar> component to create menus in an application's toolbar.

Figure 13.1. <rich:dropDownMenu>


The <rich:menuItem>, <rich:menuGroup>, and <rich:menuSeparator> components are used to construct menus for the <rich:dropDownMenu> component. Refer to Section 13.1, “<rich:dropDownMenu>” for more details on the <rich:dropDownMenu> component.

The <rich:menuItem> component represents a single item in a menu control.

The <rich:menuGroup> component represents an expandable sub-menu in a menu control. The <rich:menuGroup> component can contain a number of <rich:menuItem> components, or further nested <rich:menuGroup> components.

The <rich:panelMenu> component is used in conjunction with <rich:panelMenuItem> and <rich:panelMenuGroup> to create an expanding, hierarchical menu. The <rich:panelMenu> component's appearance can be highly customized, and the hierarchy can stretch to any number of sub-levels.


The <rich:panelMenuGroup> component defines a group of <rich:panelMenuItem> components inside a <rich:panelMenu>.

The <rich:panelMenuItem> component represents a single item inside a <rich:panelMenuGroup> component, which is in turn part of a <rich:panelMenu> component.

The <rich:toolbar> component is a horizontal toolbar. Any JavaServer Faces (JSF) component can be added to the toolbar.

Figure 13.5. <rich:toolbar>


Set the width and height of the toolbar using the common width and height attributes.

Items on the toolbar can be separated by a graphical item separator. Use the itemSeparator attribute to specify one of the standard separator styles:

Alternatively, use the itemSeparator attribute to specify a URL to an image. The image is then used as an item separator. The appearance of the item separator can be additionally customized by using the itemSeparator facet.

The <rich:toolbarGroup> component is a child component of the <rich:toolbar> component. The <rich:toolbarGroup> component is used to group a number of items together on a toolbar.