Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.richfaces.component;

The <rich:menuItem> component represents a single item in a menu control. The <rich:menuItem> component can be also be used as a seperate component without a parent menu component, such as on a toolbar.

        @Facet(name = "icon", generate = false), @Facet(name = "iconDisabled", generate = false) }, renderer = @JsfRenderer(type = .), tag = @Tag(name = "menuItem"),
        attributes = {"events-mouse-props.xml""events-key-props.xml""core-props.xml""i18n-props.xml""ajax-props.xml""bypass-props.xml" })
public abstract class AbstractMenuItem extends AbstractActionComponent {
    public static final String COMPONENT_TYPE = "org.richfaces.MenuItem";
    public static final String CSS_ROOT_DEFAULT = "ddm";


Determines how the menu item requests are submitted. Valid values:

  1. server, the default setting, submits the form normally and completely refreshes the page.
  2. ajax performs an Ajax form submission, and re-renders elements specified with the render attribute.
  3. client causes the action and actionListener items to be ignored, and the behavior is fully defined by the nested components instead of responses from submissions
    public abstract Mode getMode();


The text label for the menu item. Alternatively, use the label facet to define content for the label

Default is server

    public abstract Object getLabel();

The icon to be displayed with the menu item
    public abstract String getIcon();

The icon to be displayed with the menu item when it is disabled
    public abstract String getIconDisabled();

Disables the menu component, so it will not be clickable
    public abstract boolean isDisabled();
    @Attribute(hidden = true)
    public abstract Object getValue();
    @Attribute(generate = false, hidden = true, readOnly = true)
    public Object getCssRoot() {
        Object cssRoot = getParent().getAttributes().get("cssRoot");
        if (cssRoot == null) {
            cssRoot = ;
        return cssRoot;
    public enum Facets {
New to GrepCode? Check out our FAQ X