### 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.7. < rich:panelMenuGroup > available since 3.1.0

expand all

#### 6.10.7.1. Description

The <rich:panelMenuGroup> component is used to define an expandable group of items inside the panel menu or other group.

Figure 6.86. <rich:panelMenuGroup> component

#### 6.10.7.2. Key Features

- Highly customizable look-and-feel

- Different submission modes inside every group

- Optional submissions on expand collapse groups

- Custom and predefined icons supported

- Support for disabling

#### 6.10.7.3. Details of Usage

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

Switching mode could be chosen with the "expandMode" attribute for the concrete panelMenu group.

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

- `ServerM` (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.

There are three icon-related attributes. The "iconExpanded" attribute defines an icon for an expanded state. The "iconCollapsed" attribute defines an icon for a collapsed state. The "iconDisabled" attribute defines an icon for a disabled state.

Default icons are shown on the picture below:

Figure 6.87. Default icons

Here is an example:

Example:

    ...

    <rich:panelMenu>

            <rich:panelMenuGroup label="Group1" iconExpanded="disc" iconCollapsed="chevron">

                    <!--Nested panelMenu components-->

            </rich:panelMenuGroup>

    </rich:panelMenu>

    ...

As the result the pictures are shown below. The first one represents the collapsed state, the second one - expanded state:

Figure 6.88. Collapsed state

Figure 6.89. Expanded state

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

    ...

    <rich:panelMenu>

            <rich:panelMenuGroup label="Group1" iconExpanded="\images\img1.png" iconCollapsed="\images\img2.png">

                        <!--Nested menu components-->

            </rich:panelMenuGroup>

    </rich:panelMenu>

    ...

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

#### 6.10.7.4. Reference Data

Table of <rich:panelMenuGroup> attributes.

Table 6.124. Component Identification Parameters

Name | Value
--- | ---
component-type | org.richfaces.PanelMenuGroup
component-class | org.richfaces.component.html.HtmlPanelMenuGroup
component-family | org.richfaces.PanelMenuGroup
renderer-type | org.richfaces.PanelMenuGroupRenderer
tag-class | org.richfaces.taglib.PanelMenuGroupTag

Table 6.125. JavaScript API

Function | Description
--- | ---
expand() | Expand group element
collapse() | Collapse group element

Table 6.126. Classes names that define an upper level groups

Class name | Description
--- | ---
rich-pmenu-top-group-self-icon | Defines styles for a top group icon
rich-pmenu-top-group-self-label | Defines styles for a top group label

Table 6.127. Classes names that define a second and lower level groups

Class name | Description
--- | ---
rich-pmenu-group | Defines styles for a group
rich-pmenu-group-self-icon | Defines styles for a group icon
rich-pmenu-group-self-label | Defines styles for a group label

Table 6.128. Classes names that define a group state

Class name | Description
--- | ---
rich-pmenu-hovered-element | Defines styles for a hovered group element
rich-pmenu-disabled-element | Defines styles for a disabled group element

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

#### 6.10.7.5. Relevant Resources Links

Some additional information about usage of component can be found on the component Live Demo page.

- Prev6.10.6. <rich:panelMenu> ava...
- Top of page
- Front page
- Next6.10.8. < rich:panelMenuItem > ...