Create new RichFaces Documentation Jira issue

This will launch the RichFaces Jira page - to complete your feedback please login if needed, and submit the Jira.

JBoss.orgCommunity Documentation

6.8.3.  < rich:menuGroup > available since 3.0.0

expand all
6.8.3.1. Description
6.8.3.2. Key Features
6.8.3.3. Details of Usage
6.8.3.4. Reference Data
6.8.3.5. Relevant Resources Links

The <rich:menuGroup> component is used to define an expandable group of items inside a pop-up list or another group.


The "value" attribute defines the text representation of a group element in the page.

The "icon" attribute defines an icon for the component. The "iconDisabled" attribute defines an icon for when the group is disabled. Also you can use the "icon" and "iconDisabled" facets. If the facets are defined, the corresponding "icon" and "iconDisabled" attributes are ignored and the facets' contents are used as icons. This could be used for an item check box implementation.

Here is an example:


...
<f:facet name="icon">
        <h:selectBooleanCheckbox value="#{bean.property}"/>
</f:facet>
...

The "iconFolder" and "iconFolderDisabled" attributes are defined for using icons as folder icons. The "iconFolder" and "iconFolderDisabled" facets use their contents as folder icon representations in place of the attribute values.

The "direction" attribute is used to define which way to display the menu as shown in the example below:

Possible values are:

By default, the "direction" attribute is set to "auto".

Here is an example:


...
<rich:menuGroup value="Save As..." direction="left-down">
        <rich:menuItem   submitMode="ajax" value="Text File"  action="#{ddmenu.doSaveText}"/>
        <rich:menuItem   submitMode="ajax" value="PDF File"  action="#{ddmenu.doSavePDF}"/>
</rich:menuGroup>
...

This would be the result:


Note:

The <rich:menuGroup> component was designed to be used only for pop-up menu list creation.

Table of <rich:menuGroup> attributes.





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

On the component LiveDemo page you can see the example of <rich:menuGroup> usage and sources for the given example.