JBoss.orgCommunity Documentation
The <rich:panelMenuGroup> defines an expandable group of <rich:panelMenuItem> components inside the <rich:panelMenu>.
Different submission modes inside every group
Optional submissions on expand/collapse
Supports predefined and custom icons
Can be disabled
Has customizable look-and-feel
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:
Here is an 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:
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.
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.126. 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-group | Defines styles for panel menu group | generalTextColor | color |
headerFamilyFont | font-family | ||
headerSizeFont | font-size | ||
headerWeightFont | font-weight | ||
tableBorderColor | border-top-color | ||
.rich-pmenu-hovered-element | Defines styles for panel menu hevered element | additionalBackgroundColor | background-color |
.rich-pmenu-top-group | Defines styles for a top group element of a component | generalFamilyFont | font-family |
headerSizeFont | font-size | ||
headerTextColor | color | ||
headerWeightFont | font-weight | ||
headerBackgroundColor | background-color | ||
.rich-pmenu-top-group-div | Defines styles for a top group div element of a component | panelBorderColor | border-color |
Table 6.127. Internal style classes (selectors)
Class name (selector) | Description |
---|---|
.rich-pmenu-disabled-element | Defines styles for panel menu disabled element |
.rich-pmenu-group | Defines styles for panel menu group |
.rich-pmenu-group-self-label | Defines styles for panel menu group label |
.rich-pmenu-nowrap | Defines styles for panel menu wrapper |
.rich-pmenu-top-group | Defines styles for panel menu top group element |
.rich-pmenu-top-group-div | Defines styles for panel menu top group div element |
You can find all necessary information about style classes redefinition in Definition of Custom Style Classes section.
Visit panelMenuGroup page at RichFaces LiveDemo for examples of component usage and their sources..
If you have any questions or ideas regarding the <rich:panelMenuGroup> tell about them at the RichFaces Users Forum.