6.10.8. <rich:panelMenuItem> available since 3.1.0

### Create new RichFaces Documentation Jira issue

Summary
255 characters left
Description
Environment
This will launch the RichFaces Jira page - to complete your feedback please login if needed, and submit the Jira.

JBoss.org Community Documentation

- Prev
- Next

### 6.10.8. <rich:panelMenuItem> available since 3.1.0

expand all

#### 6.10.8.1. Description

The <rich:panelMenuItem> defines a single item inside <rich:panelMenuGroup>.

Figure 6.90. The <rich:panelMenuItem> component.

#### 6.10.8.2. Key Features

- Different submission modes inside every group

- Optional submissions on expand/collapse

- Supports predefined and custom icons

- Can be disabled

- Has customizable look-and-feel

#### 6.10.8.3. Details of Usage

All attributes except "label" are optional. The "label" attribute defines text to be represented.

The "mode" attribute could be used with three possible parameters:

- `Server` (default) — Regular form submission request is used.

- `Ajax` — Ajax submission is used for switching.

- `None`

"Action" and "actionListener" attributes are ignored. Items don't fire any submits itself. Behavior is fully defined by the components nested into items. Here is an example for value `none`:

    ...

    <rich:panelMenu>

            ...

           <rich:panelMenuItem mode="none" onclick="document.location.href='http://labs.jboss.com/jbossrichfaces/">

                    <h:outputLink value="http://labs.jboss.com/jbossrichfaces/">

                        <h:outputText value="RichFaces Home Page"></h:outputText>

                    </h:outputLink>

            </rich:panelMenuItem>

            ...

    </rich:panelMenu>

    ...

There are two icon-related attributes. The "icon" attribute defines an icon. The "iconDisabled" attribute defines an icon for a disabled item.

Default icons are shown on the picture below:

Figure 6.91. Default icons

    ...

          <rich:panelMenu>

                ...

                <rich:panelMenuItem value="Item 1.1" icon="chevronUp" />

                ...

          </rich:panelMenu>

    ...

As the result the picture is shown below:

Figure 6.92. Using an "icon" attribute

It's also possible to define a path to the icon. Simple code is placed below.

    ...

    <rich:panelMenu>

            ...

            <rich:panelMenuItem value="Item 1.1" icon="\images\img1.png" />

            ...

    </rich:panelMenu>

    ...

Information about the "process" attribute usage you can find in the "Decide what to process" guide section.

#### 6.10.8.4. Reference Data

Table of <rich:panelMenuItem> attributes.

Table 6.128. Component Identification Parameters

Name | Value
--- | ---
component-type | org.richfaces.PanelMenuItem
component-class | org.richfaces.component.html.HtmlPanelMenuItem
component-family | org.richfaces.PanelMenuItem
renderer-type | org.richfaces.PanelMenuItemRenderer
tag-class | org.richfaces.taglib.PanelMenuItemTag

Table 6.129. Style classes (selectors) and mapped skin parameters

Class name | Description | Skin parameter | CSS property
--- | --- | --- | ---
.rich-pmenu-disabled-element | Defines styles for panel menu disabled element | tabDisabledTextColor | color
.rich-pmenu-hovered-element | Defines styles for panel menu hevered element | additionalBackgroundColor | background-color
.rich-pmenu-item | Defines styles for panel menu item | generalTextColor | color
generalFamilyFont | font-family
genealSizeFont | font-size
generalWeightFont | font-weight
tableBorderColor | border-top-color

Table 6.130. Internal style classes (selectors)

Class name (selector) | Description
--- | ---
.rich-pmenu-disabled-element | Defines styles for panel menu disabled element
.rich-pmenu-group-self-label | Defines styles for panel menu group label
.rich-pmenu-item | Defines styles for panel menu item
.rich-pmenu-selected-element | Defines styles for panel menu selected element

You can find all necessary information about style classes redefinition in Definition of Custom Style Classes section.

#### 6.10.8.5. Relevant Resources Links

Visit panelMenuItem page at RichFaces LiveDemo for examples of component usage and their sources.

If you have any questions or ideas regarding the <rich:panelMenu> tell about them at the RichFaces Users Forum.

- Prev6.10.7. <rich:panelMenuGroup> avail...
- Top of page
- Front page
- Next6.10.9. < rich:progressBar > ...