org.icefaces.ace.component.menuitem

## Class MenuItemBase

- java.lang.Object
- - javax.faces.component.UIComponent
  - - javax.faces.component.UIComponentBase
    - - javax.faces.component.UICommand
      - - org.icefaces.ace.component.menuitem.MenuItemBase

- All Implemented Interfaces:
    java.util.EventListener, javax.faces.component.ActionSource, javax.faces.component.ActionSource2, javax.faces.component.behavior.ClientBehaviorHolder, javax.faces.component.PartialStateHolder, javax.faces.component.StateHolder, javax.faces.component.TransientStateHolder, javax.faces.event.ComponentSystemEventListener, javax.faces.event.FacesListener, javax.faces.event.SystemEventListenerHolder, IceClientBehaviorHolder, IMenuItem
  Direct Known Subclasses:
    MenuItem

      public abstract class MenuItemBase
      extends javax.faces.component.UICommand
      implements IMenuItem, IceClientBehaviorHolder

  MenuItem is used by various menu components

  For more information, see the MenuItem Wiki Documentation.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `protected static class` | `MenuItemBase.PropertyKeys`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `COMPONENT_TYPE`
    `static java.lang.String` | `RENDERER_TYPE`

    - ### Fields inherited from class javax.faces.component.UICommand

      `COMPONENT_FAMILY`

    - ### Fields inherited from class javax.faces.component.UIComponent

      `ATTRS_WITH_DECLARED_DEFAULT_VALUES, BEANINFO_KEY, bindings, COMPOSITE_COMPONENT_TYPE_KEY, COMPOSITE_FACET_NAME, CURRENT_COMPONENT, CURRENT_COMPOSITE_COMPONENT, FACETS_KEY, HONOR_CURRENT_COMPONENT_ATTRIBUTES_PARAM_NAME, VIEW_LOCATION_KEY`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MenuItemBase()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addClientBehavior(java.lang.String eventName, javax.faces.component.behavior.ClientBehavior behavior)`
    `java.lang.String` | `getAccesskey()` Return the value of the `accesskey` property.
    `java.lang.String` | `getDefaultEventName()`
    `java.lang.String` | `getDefaultExecute(java.lang.String event)`
    `java.lang.String` | `getDefaultRender(java.lang.String event)`
    `java.util.Collection<java.lang.String>` | `getEventNames()`
    `java.lang.String` | `getFamily()`
    `java.lang.String` | `getHelpText()` Return the value of the `helpText` property.
    `java.lang.String` | `getIcon()` Return the value of the `icon` property.
    `java.lang.String` | `getListenerArgument(java.lang.String event)`
    `java.lang.String` | `getOnclick()` Return the value of the `onclick` property.
    `java.lang.String` | `getStyle()` Return the value of the `style` property.
    `java.lang.String` | `getStyleClass()` Return the value of the `styleClass` property.
    `java.lang.String` | `getTarget()` Return the value of the `target` property.
    `java.lang.String` | `getUrl()` Return the value of the `url` property.
    `java.lang.String` | `getUrlEncoding()` Return the value of the `urlEncoding` property.
    `java.util.Map` | `getUrlParameters()` Return the value of the `urlParameters` property.
    `boolean` | `isDisabled()` Return the value of the `disabled` property.
    `protected boolean` | `isPropertySet(java.lang.String finder)`
    `void` | `setAccesskey(java.lang.String accesskey)` Set the value of the `accesskey` property.
    `void` | `setDisabled(boolean disabled)` Set the value of the `disabled` property.
    `void` | `setHelpText(java.lang.String helpText)` Set the value of the `helpText` property.
    `void` | `setIcon(java.lang.String icon)` Set the value of the `icon` property.
    `void` | `setOnclick(java.lang.String onclick)` Set the value of the `onclick` property.
    `void` | `setStyle(java.lang.String style)` Set the value of the `style` property.
    `void` | `setStyleClass(java.lang.String styleClass)` Set the value of the `styleClass` property.
    `void` | `setTarget(java.lang.String target)` Set the value of the `target` property.
    `void` | `setUrl(java.lang.String url)` Set the value of the `url` property.
    `void` | `setUrlEncoding(java.lang.String urlEncoding)` Set the value of the `urlEncoding` property.
    `void` | `setUrlParameters(java.util.Map urlParameters)` Set the value of the `urlParameters` property.
    `void` | `setValueExpression(java.lang.String name, javax.el.ValueExpression binding)`

    - ### Methods inherited from class javax.faces.component.UICommand

      `addActionListener, broadcast, getAction, getActionExpression, getActionListener, getActionListeners, getValue, isImmediate, queueEvent, removeActionListener, setAction, setActionExpression, setActionListener, setImmediate, setValue`

    - ### Methods inherited from class javax.faces.component.UIComponentBase

      `addFacesListener, clearInitialState, decode, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientBehaviors, getClientId, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getListenersForEventClass, getParent, getRenderer, getRendererType, getRendersChildren, getValueBinding, invokeOnComponent, isRendered, isTransient, markInitialState, processDecodes, processRestoreState, processSaveState, processUpdates, processValidators, removeFacesListener, restoreAttachedState, restoreState, saveAttachedState, saveState, setId, setParent, setRendered, setRendererType, setTransient, setValueBinding, subscribeToEvent, unsubscribeFromEvent`

    - ### Methods inherited from class javax.faces.component.UIComponent

      `encodeAll, getClientId, getCompositeComponentParent, getContainerClientId, getCurrentComponent, getCurrentCompositeComponent, getNamingContainer, getResourceBundleMap, getStateHelper, getStateHelper, getTransientStateHelper, getTransientStateHelper, getValueExpression, initialStateMarked, isCompositeComponent, isInView, isVisitable, popComponentFromEL, processEvent, pushComponentToEL, restoreTransientState, saveTransientState, setInView, visitTree`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface javax.faces.component.behavior.ClientBehaviorHolder

      `getClientBehaviors`

- - ### Field Detail

    - #### COMPONENT_TYPE

          public static final java.lang.String COMPONENT_TYPE

      See Also:
        Constant Field Values

    - #### RENDERER_TYPE

          public static final java.lang.String RENDERER_TYPE

  - ### Constructor Detail

    - #### MenuItemBase

          public MenuItemBase()

  - ### Method Detail

    - #### getFamily

          public java.lang.String getFamily()

      Overrides:
        `getFamily` in class `javax.faces.component.UICommand`

    - #### setAccesskey

          public void setAccesskey(java.lang.String accesskey)

      Set the value of the `accesskey` property.

      Contents: Access key that, when pressed, activates this component.

      Specified by:
        `setAccesskey` in interface `IMenuItem`

    - #### getAccesskey

          public java.lang.String getAccesskey()

      Return the value of the `accesskey` property.

      Contents: Access key that, when pressed, activates this component.

      Specified by:
        `getAccesskey` in interface `IMenuItem`

    - #### setDisabled

          public void setDisabled(boolean disabled)

      Set the value of the `disabled` property.

      Contents: Boolean value to disable/enable the menu item. The menu item will still be shown but with different styling, and clicking on it will not trigger any action.

      Specified by:
        `setDisabled` in interface `IMenuItem`

    - #### isDisabled

          public boolean isDisabled()

      Return the value of the `disabled` property.

      Contents: Boolean value to disable/enable the menu item. The menu item will still be shown but with different styling, and clicking on it will not trigger any action.

      Specified by:
        `isDisabled` in interface `IMenuItem`

    - #### setHelpText

          public void setHelpText(java.lang.String helpText)

      Set the value of the `helpText` property.

      Contents: Text to display additional information. The text appears as a standard browser tooltip.

      Specified by:
        `setHelpText` in interface `IMenuItem`

    - #### getHelpText

          public java.lang.String getHelpText()

      Return the value of the `helpText` property.

      Contents: Text to display additional information. The text appears as a standard browser tooltip.

      Specified by:
        `getHelpText` in interface `IMenuItem`

    - #### setIcon

          public void setIcon(java.lang.String icon)

      Set the value of the `icon` property.

      Contents: Path of the menuitem image.

      Specified by:
        `setIcon` in interface `IMenuItem`

    - #### getIcon

          public java.lang.String getIcon()

      Return the value of the `icon` property.

      Contents: Path of the menuitem image.

      Specified by:
        `getIcon` in interface `IMenuItem`

    - #### setOnclick

          public void setOnclick(java.lang.String onclick)

      Set the value of the `onclick` property.

      Contents: Javascript event handler for click event. If this function explicitly returns 'false', then the request to the server will be cancelled.

      Specified by:
        `setOnclick` in interface `IMenuItem`

    - #### getOnclick

          public java.lang.String getOnclick()

      Return the value of the `onclick` property.

      Contents: Javascript event handler for click event. If this function explicitly returns 'false', then the request to the server will be cancelled.

      Specified by:
        `getOnclick` in interface `IMenuItem`

    - #### setStyle

          public void setStyle(java.lang.String style)

      Set the value of the `style` property.

      Contents: Style of the menuitem label.

      Specified by:
        `setStyle` in interface `IMenuItem`

    - #### getStyle

          public java.lang.String getStyle()

      Return the value of the `style` property.

      Contents: Style of the menuitem label.

      Specified by:
        `getStyle` in interface `IMenuItem`

    - #### setStyleClass

          public void setStyleClass(java.lang.String styleClass)

      Set the value of the `styleClass` property.

      Contents: StyleClass of the menuitem label.

      Specified by:
        `setStyleClass` in interface `IMenuItem`

    - #### getStyleClass

          public java.lang.String getStyleClass()

      Return the value of the `styleClass` property.

      Contents: StyleClass of the menuitem label.

      Specified by:
        `getStyleClass` in interface `IMenuItem`

    - #### setTarget

          public void setTarget(java.lang.String target)

      Set the value of the `target` property.

      Contents: Target type of url navigation.

      Specified by:
        `setTarget` in interface `IMenuItem`

    - #### getTarget

          public java.lang.String getTarget()

      Return the value of the `target` property.

      Contents: Target type of url navigation.

      Specified by:
        `getTarget` in interface `IMenuItem`

    - #### setUrl

          public void setUrl(java.lang.String url)

      Set the value of the `url` property.

      Contents: Url to be navigated when menuitem is clicked.

      Specified by:
        `setUrl` in interface `IMenuItem`

    - #### getUrl

          public java.lang.String getUrl()

      Return the value of the `url` property.

      Contents: Url to be navigated when menuitem is clicked.

      Specified by:
        `getUrl` in interface `IMenuItem`

    - #### setUrlEncoding

          public void setUrlEncoding(java.lang.String urlEncoding)

      Set the value of the `urlEncoding` property.

      Contents: Specifies the encoding type for value of the 'url' attribute. Possible values are "resource", "action", "partialaction", "bookmarkable", "redirect", and "none". For all encodings other than "resource" and "none" the URL must be relative to the context path and must start with '/'. For external links and to render the value of the 'url' attribute unmodified use "none".

      Specified by:
        `setUrlEncoding` in interface `IMenuItem`

    - #### getUrlEncoding

          public java.lang.String getUrlEncoding()

      Return the value of the `urlEncoding` property.

      Contents: Specifies the encoding type for value of the 'url' attribute. Possible values are "resource", "action", "partialaction", "bookmarkable", "redirect", and "none". For all encodings other than "resource" and "none" the URL must be relative to the context path and must start with '/'. For external links and to render the value of the 'url' attribute unmodified use "none". Default = 'resource'.

      Specified by:
        `getUrlEncoding` in interface `IMenuItem`

    - #### setUrlParameters

          public void setUrlParameters(java.util.Map urlParameters)

      Set the value of the `urlParameters` property.

      Contents: Specifies an optional map of parameters to use when encoding URLs of the "bookmarkable" and "redirect" types. The value of this attribute must evaluate to an object of type Map>.

      Specified by:
        `setUrlParameters` in interface `IMenuItem`

    - #### getUrlParameters

          public java.util.Map getUrlParameters()

      Return the value of the `urlParameters` property.

      Contents: Specifies an optional map of parameters to use when encoding URLs of the "bookmarkable" and "redirect" types. The value of this attribute must evaluate to an object of type Map>.

      Specified by:
        `getUrlParameters` in interface `IMenuItem`

    - #### isPropertySet

          protected boolean isPropertySet(java.lang.String finder)

    - #### setValueExpression

          public void setValueExpression(java.lang.String name,
                                         javax.el.ValueExpression binding)

      Overrides:
        `setValueExpression` in class `javax.faces.component.UIComponent`

    - #### getEventNames

          public java.util.Collection<java.lang.String> getEventNames()

      Specified by:
        `getEventNames` in interface `javax.faces.component.behavior.ClientBehaviorHolder`
      Overrides:
        `getEventNames` in class `javax.faces.component.UIComponentBase`

    - #### getDefaultEventName

          public java.lang.String getDefaultEventName()

      Specified by:
        `getDefaultEventName` in interface `javax.faces.component.behavior.ClientBehaviorHolder`
      Overrides:
        `getDefaultEventName` in class `javax.faces.component.UIComponentBase`

    - #### getDefaultRender

          public java.lang.String getDefaultRender(java.lang.String event)

      Specified by:
        `getDefaultRender` in interface `IceClientBehaviorHolder`

    - #### getDefaultExecute

          public java.lang.String getDefaultExecute(java.lang.String event)

      Specified by:
        `getDefaultExecute` in interface `IceClientBehaviorHolder`

    - #### getListenerArgument

          public java.lang.String getListenerArgument(java.lang.String event)

      Specified by:
        `getListenerArgument` in interface `IceClientBehaviorHolder`

    - #### addClientBehavior

          public void addClientBehavior(java.lang.String eventName,
                                        javax.faces.component.behavior.ClientBehavior behavior)

      Specified by:
        `addClientBehavior` in interface `javax.faces.component.behavior.ClientBehaviorHolder`
      Overrides:
        `addClientBehavior` in class `javax.faces.component.UIComponentBase`

Copyright 2025 ICEsoft Technologies Canada, Corp. All Rights Reserved.