JBoss.orgCommunity Documentation
The <rich:panelMenuItem> component is used to define a single item inside popup list.
Highly customizable look-and-feel
Different submission modes
Optionally supports any content inside
Custom and predefined icons supported
Support for disabling
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":
Example:
...
<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:
Here is an example:
Example:
...
<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.
Table 6.130. 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.131. Classes names that define the first level items
Class name | Description |
---|---|
rich-pmenu-top-item | Defines styles for a top panel menu item |
rich-pmenu-top-item-icon | Defines styles for a top panel menu item icon |
rich-pmenu-top-item-label | Defines styles for a top panel menu item label |
Table 6.132. Classes names that define the second and lower level items
Class name | Description |
---|---|
rich-pmenu-item | Defines styles for a panel menu item |
rich-pmenu-item-icon | Defines styles for a panel menu item icon |
rich-pmenu-item-label | Defines styles for a panel menu item label |
Table 6.133. Classes names that define items state
Class name | Description |
---|---|
rich-pmenu-item-selected | Defines styles for a panel menu selected item |
rich-pmenu-disabled-element | Defines styles for a disabled panel menu item |
rich-pmenu-hovered-element | Defines styles for a hovered panel menu item |
Some additional information about usage of component can be found on this LiveDemo page.