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.10.8.  <rich:panelMenuItem> available since 3.1.0

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


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

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

"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:



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

As the result the picture is shown below:


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.

Table of <rich:panelMenuItem> attributes.




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

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.