14.5. <rich:toolbar>
The
<rich:toolbar> component is a horizontal toolbar. Any JavaServer Faces (JSF) component can be added to the toolbar.
14.5.1. Basic usage
The
<rich:toolbar> component does not require any attributes to be defined for basic usage. Add child components to the <rich:toolbar> component to have them appear on the toolbar when rendered.
Example 14.3. Basic usage
<rich:toolbar> <h:commandLink value="News" /> <h:commandLink value="Reviews" /> <h:commandLink value="Galleries" /> </rich:toolbar>
14.5.2. Appearance
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:
none, the default appearance, does not show any item separators.discshows a small circular disc to separate items:
gridshows a grid pattern to separate items:
lineshows a vertical line to separate items:
squareshows a small square to separate items:
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.
14.5.3. Grouping items
Group together multiple items on the toolbar by using the
<rich:toolbarGroup> child component. Refer to Section 14.5.6, “<rich:toolbarGroup>” for full details on the <rich:toolbarGroup> component.
14.5.4. Reference data
component-type:org.richfaces.Toolbarcomponent-class:org.richfaces.component.UIToolbarcomponent-family:org.richfaces.Toolbarrenderer-type:org.richfaces.ToolbarRenderer
14.5.5. Style classes and skin parameters
Table 14.4. Style classes (selectors) and corresponding skin parameters
| Class (selector) | Skin Parameters | Mapped CSS properties |
|---|---|---|
| panelBorderColor
|
border-color
|
headerTextColor
|
color
| |
headerBackgroundColor
|
background-color
| |
headerFamilyFont
|
font-family
| |
headerSizeFont
|
font-size
| |
headerWeightFont
|
font-weight
| |
| No skin parameters. | |
| No skin parameters. | |
| No skin parameters. | |
| No skin parameters. | |
14.5.6. <rich:toolbarGroup>
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.
14.5.6.1. Basic usage
Like the
<rich:toolbar> parent component, the <rich:toolbarGroup> component does not require any extra attributes for basic functionality. Add child components to the <rich:toolbarGroup> component to have them appear grouped on the parent toolbar when rendered.
14.5.6.2. Appearance
Similar to the
<rich:toolbar> component, items within a <rich:toolbarGroup> can be separated by specifying the itemSeparator attribute. Refer to Section 14.5.2, “Appearance” for details on using the itemSeparator attribute.
Groups of toolbar items can be located on either the left-hand side or the right-hand side of the parent toolbar. By default, they appear to the left. To locate the toolbar group to the right of the parent toolbar, set
location="right".

Example 14.4. <rich:toolbarGroup>
<rich:toolBar height="26" itemSeparator="grid"> <rich:toolBarGroup> <h:graphicImage value="/images/icons/create_doc.gif"/> <h:graphicImage value="/images/icons/create_folder.gif"/> <h:graphicImage value="/images/icons/copy.gif"/> </rich:toolBarGroup> <rich:toolBarGroup> <h:graphicImage value="/images/icons/save.gif"/> <h:graphicImage value="/images/icons/save_as.gif"/> <h:graphicImage value="/images/icons/save_all.gif"/> </rich:toolBarGroup> <rich:toolBarGroup location="right"> <h:graphicImage value="/images/icons/find.gif"/> <h:graphicImage value="/images/icons/filter.gif"/> </rich:toolBarGroup> </rich:toolBar>
The example shows how to locate a toolbar group to the right-hand side of the parent toolbar. It also demonstrates how item separators on the parent toolbar work with toolbar groups.

14.5.6.3. Reference data
component-type:org.richfaces.ToolbarGroupcomponent-class:org.richfaces.component.UIToolbarGroupcomponent-family:org.richfaces.Toolbarrenderer-type:org.richfaces.ToolbarGroupRenderer
