JBoss.orgCommunity Documentation

Chapter 12. Menus and toolbars

12.1. <rich:dropDownMenu>
12.1.1. Basic usage
12.1.2. Menu content
12.1.3. Appearance
12.1.4. Expanding and collapsing the menu
12.1.5. Reference data
12.1.6. Style classes and skin parameters
12.2. <rich:contextMenu>
12.2.1. Basic usage
12.2.2. Appearance
12.2.3. Expanding and collapsing the menu
12.2.4. Text substitutions
12.2.5. Reference data
12.2.6. Style classes and skin parameters
12.3. Menu sub-components
12.3.1. <rich:menuItem>
12.3.2. <rich:menuGroup>
12.3.3. <rich:menuSeparator>
12.4. <rich:panelMenu>
12.4.1. Basic usage
12.4.2. Interactivity options
12.4.3. Appearance
12.4.4. Submission modes
12.4.5. <rich:panelMenu> server-side events
12.4.6. JavaScript API
12.4.7. Reference data
12.4.8. Style classes and skin parameters
12.4.9. <rich:panelMenuGroup>
12.4.10. <rich:panelMenuItem>
12.5. <rich:toolbar>
12.5.1. Basic usage
12.5.2. Appearance
12.5.3. Grouping items
12.5.4. Reference data
12.5.5. Style classes and skin parameters
12.5.6. <rich:toolbarGroup>

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.


Table 12.1. Style classes (selectors) and corresponding skin parameters

Class (selector)Skin ParametersMapped CSS properties
.rf-ddm-lbl
This class defines styles for the label of the drop-down menu.

headerFamilyFont

font-family

.rf-ddm-dis
This class defines styles for the drop-down menu when it is disabled.

tabDisabledTextColor

color

.rf-ddm-lbl-dis
This class defines styles for the label of the drop-down menu when it is disabled.

headerFamilyFont

font-family

.rf-ddm-pos
This class defines the positioning of the drop-down menu.

No skin parameters.

.rf-ddm-lbl-unsel
This class defines styles for the label of the drop-down menu when it is unselected.

No skin parameters.

.rf-ddm-lst
This class defines styles for the drop-down list.

panelBorderColor

border-color

additionalBackgroundColor

background-color

.rf-ddm-lst-bg
This class defines styles for the background of the drop-down list.

additionalBackgroundColor

border-color

.rf-ddm-sublst
This class defines the positioning of the menu when used as a sub-menu.

No skin parameters.

.rf-ddm-itm
This class defines styles for a menu item.

generalFamilyFont

font-family

generalSizeFont

font-size

.rf-ddm-itm-sel
This class defines styles for a menu item when it is selected.

headerBackgroundColor

border-color

tabBackgroundColor

background-color

.rf-ddm-itm-unsel
This class defines styles for a menu item when it is unselected.

No skin parameters.

.rf-ddm-itm-dis
This class defines styles for a menu item when it is disabled.

tabDisabledTextColor

color

.rf-ddm-itm-lbl
This class defines styles for the label in a menu item.

generalTextColor

color

.rf-ddm-itm-ic
This class defines styles for the icon in a menu item.

No skin parameters.

.rf-ddm-emptyIcon
This class defines styles for an empty icon in a menu item.

No skin parameters.

.rf-ddm-sep
This class defines styles for a menu separator.

panelBorderColor

border-top-color

.rf-ddm-nd
This class defines styles for a menu node.

No skin parameters.


The <rich:contextMenu> component is used for creating a hierarchical context menu that are activated on events like onmouseover , onclick etc. The component can be applied to any element on the page.


Table 12.2. Style classes (selectors) and corresponding skin parameters

Class (selector)Skin ParametersMapped CSS properties
.rf-ctx-lbl
This class defines styles for the top level container of the context menu.

headerFamilyFont

font-family

.rf-ctx-dis
This class defines styles for the context menu when it is disabled.

tabDisabledTextColor

color

.rf-ctx-lbl-dis
This class defines styles for the top level of the context menu when it is disabled.

headerFamilyFont

font-family

.rf-ctx-pos
This class defines the positioning of the context menu.

No skin parameters.

.rf-ctx-lbl-unsel
This class defines styles for the top level of the context menu when it is unselected.

No skin parameters.

.rf-ctx-lst
This class defines styles for the context list.

panelBorderColor

border-color

additionalBackgroundColor

background-color

.rf-ctx-lst-bg
This class defines styles for the background of the context list.

additionalBackgroundColor

border-color

.rf-ctx-sublst
This class defines the positioning of the menu when used as a sub-menu.

No skin parameters.

.rf-ctx-itm
This class defines styles for a menu item.

generalFamilyFont

font-family

generalSizeFont

font-size

.rf-ctx-itm-sel
This class defines styles for a menu item when it is selected.

headerBackgroundColor

border-color

tabBackgroundColor

background-color

.rf-ctx-itm-unsel
This class defines styles for a menu item when it is unselected.

No skin parameters.

.rf-ctx-itm-dis
This class defines styles for a menu item when it is disabled.

tabDisabledTextColor

color

.rf-ctx-itm-lbl
This class defines styles for the label in a menu item.

generalTextColor

color

.rf-ctx-itm-ic
This class defines styles for the icon in a menu item.

No skin parameters.

.rf-ctx-emptyIcon
This class defines styles for an empty icon in a menu item.

No skin parameters.

.rf-ctx-sep
This class defines styles for a menu separator.

panelBorderColor

border-top-color

.rf-ctx-nd
This class defines styles for a menu node.

No skin parameters.


The <rich:menuItem>, <rich:menuGroup>, and <rich:menuSeparator> components are used to construct menus for the <rich:dropDownMenu> component. Refer to Section 12.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:menuItem> component can be also be used as a seperate component without a parent menu component, such as on a toolbar.

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.


Icons for the panel menu can be chosen from a set of standard icons. Icons can be set for the top panel menu, child panel menus, and child item. There are three different menu states that the icon represents, as well as icons for both the left and right side of the item title.

topGroupExpandedLeftIcon, topGroupExpandedRightIcon
These attributes determine the icons for the top level menu when it is expanded.
topGroupCollapsedLeftIcon, topGroupCollapsedRightIcon
These attributes determine the icons for the top level menu when it is collapsed.
topGroupDisabledLeftIcon, topGroupDisabledRightIcon
These attributes determine the icons for the top level menu when it is disabled.
topItemLeftIcon, topItemRightIcon
These attributes determine the icons for a top level menu item.
topItemDisabledLeftIcon, topItemDisabledRightIcon
These attributes determine the icons for a top level menu item when it is disabled.
groupExpandedLeftIcon, groupExpandedRightIcon
These attributes determine the icons for sub-menus that are not the top-level menu when they are expanded.
groupCollapsedLeftIcon, groupCollapsedRightIcon
These attributes determine the icons for sub-menus that are not the top-level menu when they are collapsed.
groupDisabledLeftIcon, groupDisabledRightIcon
These attributes determine the icons for sub-menus that are not the top-level menu when they are disabled.
itemLeftIcon, itemRightIcon
These attributes determine the icons for items in the menus.
itemDisabledLeftIcon, itemDisabledRightIcon
These attributes determine the icons for items in the menus when they are disabled.

Example 12.2, “panelMenu” demonstrates the use of icon declaration at the panel menu level. The standard icons are shown in Figure 9.4, “<Standard icons>”. Alternatively, point the icon attributes to the paths of image files. The image files are then used as icons.

Any icons specified by child <rich:panelMenuGroup> and <rich:panelMenuItem> components overwrite the relevant icons declared with the parent <rich:panelMenu> component.

Table 12.3. Style classes (selectors) and corresponding skin parameters

Class (selector)Skin ParametersMapped CSS properties
.rf-pm
This class defines styles for the panel menu itself.

No skin parameters.

.rf-pm-gr
This class defines styles for a panel menu group.

panelBorderColor

border-top-color

.rf-pm-exp, .rf-pm-colps
These classes define styles for the panel menu when it is expanded or collapsed.

No skin parameters.

.rf-pm-ico
This class defines styles for the panel menu icons.

No skin parameters.

.rf-pm-ico-exp, .rf-pm-ico-colps
These classes define styles for the panel menu icons when they are expanded or collapsed.

No skin parameters.

.rf-pm-hdr-exp, .rf-pm-hdr-colps
These classes define styles for the panel menu headers when they are expanded or collapsed.

No skin parameters.

.rf-pm-itm
This class defines styles for a panel menu item.

panelBorderColor

border-top-color

generalTextColor

color

.rf-pm-itm-gr
This class defines styles for a panel menu item as part of a panel menu group.

No skin parameters.

.rf-pm-itm:hover
This class defines styles for a panel menu item when the mouse hovers over it.

additionalBackgroundColor

background-color

.rf-pm-itm-sel
This class defines styles for a panel menu item when it is selected.

No skin parameters.

.rf-pm-itm-dis
This class defines styles for a panel menu item when it is disabled.

tabDisabledTextColor

color

.rf-pm-itm-ico
This class defines styles for the icon in a panel menu item.

No skin parameters.

.rf-pm-itm-exp-ico
This class defines styles for the icon in a panel menu item when it is expanded.

No skin parameters.

.rf-pm-itm-lbl
This class defines styles for the label in a panel menu item.

generalSizeFont

font-size

generalFamilyFont

font-family

.rf-pm-gr
This class defines styles for a panel menu group.

panelBorderColor

border-top-color

.rf-pm-gr-gr
This class defines styles for a panel menu group as part of another panel menu group.

No skin parameters.

.rf-pm-gr-sel
This class defines styles for a panel menu group when it is selected.

No skin parameters.

.rf-pm-gr-hdr
This class defines styles for the header of a panel menu group.

generalTextColor

color

.rf-pm-gr-hdr:hover
This class defines styles for the header of a panel menu group when the mouse hovers over it.

additionalBackgroundColor

background

.rf-pm-gr-hdr-dis
This class defines styles for the header of a panel menu group when it is disabled.

tabDisabledTextColor

color

.rf-pm-gr-ico
This class defines styles for the icon in a panel menu group.

No skin parameters.

.rf-pm-gr-exp-ico
This class defines styles for the icon in a panel menu group when it is expanded.

No skin parameters.

.rf-pm-gr-lbl
This class defines styles for the label in a panel menu group.

generalSizeFont

font-size

generalFamilyFont

font-family

.rf-pm-gr-cnt
This class defines styles for the content of a panel menu group.

No skin parameters.

.rf-pm-top-itm
This class defines styles for the top panel menu item.

panelBorderColor

border-color

generalTextColor

color

.rf-pm-top-itm-gr
This class defines styles for the top panel menu item as part of a panel menu group.

No skin parameters.

.rf-pm-top-itm:hover
This class defines styles for the top panel menu item when the mouse hovers over it.

headerTextColor

color

.rf-pm-top-itm-sel
This class defines styles for the top panel menu item when it is selected.

No skin parameters.

.rf-pm-top-itm-dis
This class defines styles for the top panel menu item when it is disabled.

tabDisabledTextColor

color

.rf-pm-top-itm-ico
This class defines styles for the icon in the top panel menu item.

No skin parameters.

.rf-pm-top-itm-exp-ico
This class defines styles for the icon in the top panel menu item when it is expanded.

No skin parameters.

.rf-pm-top-itm-lbl
This class defines styles for the label in the top panel menu item.

generalSizeFont

font-size

generalFamilyFont

font-family

.rf-pm-top-gr
This class defines styles for the top panel menu group.

panelBorderColor

border-color

.rf-pm-top-gr-gr
This class defines styles for the top panel menu group as part of another panel menu group.

No skin parameters.

.rf-pm-top-gr-sel
This class defines styles for the top panel menu group when it is selected.

No skin parameters.

.rf-pm-top-gr-hdr
This class defines styles for the header of the top panel menu group.

headerTextColor

color

headerBackgroundColor

background-color

.rf-pm-top-gr-hdr-dis
This class defines styles for the header of the top panel menu group when it is disabled.

tabDisabledTextColor

color

additionalBackgroundColor

background-color

.rf-pm-top-gr-ico
This class defines styles for the icon in the top panel menu group.

No skin parameters.

.rf-pm-top-gr-exp-ico
This class defines styles for the icon in the top panel menu group when it is expanded.

No skin parameters.

.rf-pm-top-gr-lbl
This class defines styles for the label in the top panel menu group.

generalSizeFont

font-size

generalFamilyFont

font-family

.rf-pm-top-gr-cnt
This class defines styles for the content of the top panel menu group.

No skin parameters.


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

Icons for the menu group are inherited from the parent <rich:panelMenu> component. Refer to Section 12.4.3, “Appearance” for details on icon attributes and facets. Alternatively, the menu group’s icons can be re-defined at the <rich:panelMenuGroup> component level, and these settings will be used instead of the parent component’s settings.

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

Icons for the menu item are inherited from the parent <rich:panelMenu> or <rich:panelMenuGroup> component. Refer to Section 12.4.3, “Appearance” for details on icon attributes and facets. Alternatively, the menu item’s icons can be re-defined at the <rich:panelMenuItem> component level, and these settings will be used instead of the parent component’s settings.

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


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.