org.icefaces.ace.component.menu

## Class MenuBase

- java.lang.Object
- - javax.faces.component.UIComponent
  - - javax.faces.component.UIComponentBase
    - - org.icefaces.ace.component.menu.AbstractMenu
      - - org.icefaces.ace.component.menu.MenuBase

- All Implemented Interfaces:
    java.util.EventListener, javax.faces.component.PartialStateHolder, javax.faces.component.StateHolder, javax.faces.component.TransientStateHolder, javax.faces.event.ComponentSystemEventListener, javax.faces.event.FacesListener, javax.faces.event.SystemEventListenerHolder, IMenu
  Direct Known Subclasses:
    Menu

      public abstract class MenuBase
      extends AbstractMenu
      implements IMenu

  Menu is a navigation component with various customized modes like multi tiers, overlay and nested menus.

  For more information, see the Menu Wiki Documentation.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `protected static class` | `MenuBase.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.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
    `MenuBase()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `getAt()` Return the value of the `at` property.
    `java.lang.String` | `getBackLabel()` Return the value of the `backLabel` property.
    `java.lang.String` | `getEffect()` Return the value of the `effect` property.
    `int` | `getEffectDuration()` Return the value of the `effectDuration` property.
    `java.lang.String` | `getFamily()`
    `java.lang.Integer` | `getForceUpdateCounter()` Return the value of the `forceUpdateCounter` property.
    `int` | `getMaxHeight()` Return the value of the `maxHeight` property.
    `MenuModel` | `getModel()` Return the value of the `model` property.
    `java.lang.String` | `getMy()` Return the value of the `my` property.
    `java.lang.String` | `getPosition()` Return the value of the `position` 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` | `getSubmenuLabels()` Return the value of the `submenuLabels` property.
    `java.lang.String` | `getTrigger()` Return the value of the `trigger` property.
    `java.lang.String` | `getTriggerEvent()` Return the value of the `triggerEvent` property.
    `java.lang.String` | `getType()` Return the value of the `type` property.
    `java.lang.String` | `getWidgetVar()` Return the value of the `widgetVar` property.
    `int` | `getZindex()` Return the value of the `zindex` property.
    `java.lang.Boolean` | `isForceMenuUpdate()` Return the value of the `forceMenuUpdate` property.
    `protected boolean` | `isPropertySet(java.lang.String finder)`
    `boolean` | `isTiered()` Return the value of the `tiered` property.
    `void` | `setAt(java.lang.String at)` Set the value of the `at` property.
    `void` | `setBackLabel(java.lang.String backLabel)` Set the value of the `backLabel` property.
    `void` | `setEffect(java.lang.String effect)` Set the value of the `effect` property.
    `void` | `setEffectDuration(int effectDuration)` Set the value of the `effectDuration` property.
    `void` | `setForceMenuUpdate(java.lang.Boolean forceMenuUpdate)` Set the value of the `forceMenuUpdate` property.
    `void` | `setForceUpdateCounter(java.lang.Integer forceUpdateCounter)` Set the value of the `forceUpdateCounter` property.
    `void` | `setMaxHeight(int maxHeight)` Set the value of the `maxHeight` property.
    `void` | `setModel(MenuModel model)` Set the value of the `model` property.
    `void` | `setMy(java.lang.String my)` Set the value of the `my` property.
    `void` | `setPosition(java.lang.String position)` Set the value of the `position` 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` | `setSubmenuLabels(java.lang.String submenuLabels)` Set the value of the `submenuLabels` property.
    `void` | `setTiered(boolean tiered)` Set the value of the `tiered` property.
    `void` | `setTrigger(java.lang.String trigger)` Set the value of the `trigger` property.
    `void` | `setTriggerEvent(java.lang.String triggerEvent)` Set the value of the `triggerEvent` property.
    `void` | `setType(java.lang.String type)` Set the value of the `type` property.
    `void` | `setValueExpression(java.lang.String name, javax.el.ValueExpression binding)`
    `void` | `setWidgetVar(java.lang.String widgetVar)` Set the value of the `widgetVar` property.
    `void` | `setZindex(int zindex)` Set the value of the `zindex` property.

    - ### Methods inherited from class org.icefaces.ace.component.menu.AbstractMenu

      `buildMenuFromModel, isBuiltFromModel, isDynamic, markAsBuiltFromModel, processDecodes, setTransientRecursive, shouldBuildFromModel`

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

      `addClientBehavior, addFacesListener, broadcast, clearInitialState, decode, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientBehaviors, getClientId, getDefaultEventName, getEventNames, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getListenersForEventClass, getParent, getRenderer, getRendererType, getRendersChildren, getValueBinding, invokeOnComponent, isRendered, isTransient, markInitialState, processRestoreState, processSaveState, processUpdates, processValidators, queueEvent, 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`

- - ### 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

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### MenuBase

          public MenuBase()

  - ### Method Detail

    - #### getFamily

          public java.lang.String getFamily()

      Specified by:
        `getFamily` in class `javax.faces.component.UIComponent`

    - #### setAt

          public void setAt(java.lang.String at)

      Set the value of the `at` property.

      Contents: When position is dynamic, this attribute specifies the corner of trigger element to align with the menu. The format is "<left|right> <top|bottom>" (examples: "left top", "right bottom").

      Specified by:
        `setAt` in interface `IMenu`

    - #### getAt

          public java.lang.String getAt()

      Return the value of the `at` property.

      Contents: When position is dynamic, this attribute specifies the corner of trigger element to align with the menu. The format is "<left|right> <top|bottom>" (examples: "left top", "right bottom"). Default = 'left bottom'.

      Specified by:
        `getAt` in interface `IMenu`

    - #### setBackLabel

          public void setBackLabel(java.lang.String backLabel)

      Set the value of the `backLabel` property.

      Contents: Label for the 'back' link (only applies to sliding menus).

      Specified by:
        `setBackLabel` in interface `IMenu`

    - #### getBackLabel

          public java.lang.String getBackLabel()

      Return the value of the `backLabel` property.

      Contents: Label for the 'back' link (only applies to sliding menus). Default = 'Back'.

      Specified by:
        `getBackLabel` in interface `IMenu`

    - #### setEffect

          public void setEffect(java.lang.String effect)

      Set the value of the `effect` property.

      Contents: Sets the effect for the menu display, default value is FADE. Possible values are "FADE", "SLIDE", "NONE". Use "NONE" to disable animation at all.

      Specified by:
        `setEffect` in interface `IMenu`

    - #### getEffect

          public java.lang.String getEffect()

      Return the value of the `effect` property.

      Contents: Sets the effect for the menu display, default value is FADE. Possible values are "FADE", "SLIDE", "NONE". Use "NONE" to disable animation at all. Default = 'fade'.

      Specified by:
        `getEffect` in interface `IMenu`

    - #### setEffectDuration

          public void setEffectDuration(int effectDuration)

      Set the value of the `effectDuration` property.

      Contents: Sets the effect duration in milliseconds.

      Specified by:
        `setEffectDuration` in interface `IMenu`

    - #### getEffectDuration

          public int getEffectDuration()

      Return the value of the `effectDuration` property.

      Contents: Sets the effect duration in milliseconds. Default = '400'.

      Specified by:
        `getEffectDuration` in interface `IMenu`

    - #### setForceMenuUpdate

          public void setForceMenuUpdate(java.lang.Boolean forceMenuUpdate)

      Set the value of the `forceMenuUpdate` property.

      Contents: Set to true when the entire menu needs to be updated in the client, such as when an individual menu item changes label or styling, and the entire menu needs to be reinitialized in the client in order to get all the styling and behaviour re-applied to the new HTML nodes. The value of this attribute will be automatically set to false by the component after consuming it (if applicable).

      Specified by:
        `setForceMenuUpdate` in interface `IMenu`

    - #### isForceMenuUpdate

          public java.lang.Boolean isForceMenuUpdate()

      Return the value of the `forceMenuUpdate` property.

      Contents: Set to true when the entire menu needs to be updated in the client, such as when an individual menu item changes label or styling, and the entire menu needs to be reinitialized in the client in order to get all the styling and behaviour re-applied to the new HTML nodes. The value of this attribute will be automatically set to false by the component after consuming it (if applicable). Default = 'false'.

      Specified by:
        `isForceMenuUpdate` in interface `IMenu`

    - #### setMaxHeight

          public void setMaxHeight(int maxHeight)

      Set the value of the `maxHeight` property.

      Contents: Maximum height (in pixels) for the menu (only applies to sliding menus).

      Specified by:
        `setMaxHeight` in interface `IMenu`

    - #### getMaxHeight

          public int getMaxHeight()

      Return the value of the `maxHeight` property.

      Contents: Maximum height (in pixels) for the menu (only applies to sliding menus). Default = '200'.

      Specified by:
        `getMaxHeight` in interface `IMenu`

    - #### setModel

          public void setModel(MenuModel model)

      Set the value of the `model` property.

      Contents: org.icefaces.ace.model.MenuModel instance to create menus programmatically. For the menuitem and submenu components, use explicit ids, and avoid long processing in the getter method for this property, as it will be called multiple times, in every lifecycle. If using MyFaces, see wiki page for some known issues.

      Specified by:
        `setModel` in interface `IMenu`

    - #### getModel

          public MenuModel getModel()

      Return the value of the `model` property.

      Contents: org.icefaces.ace.model.MenuModel instance to create menus programmatically. For the menuitem and submenu components, use explicit ids, and avoid long processing in the getter method for this property, as it will be called multiple times, in every lifecycle. If using MyFaces, see wiki page for some known issues.

      Specified by:
        `getModel` in interface `IMenu`
      Specified by:
        `getModel` in class `AbstractMenu`

    - #### setMy

          public void setMy(java.lang.String my)

      Set the value of the `my` property.

      Contents: When position is dynamic, this attribute specifies the corner of the menu to align with the trigger element. The format is "<left|right> <top|bottom>" (examples: "left top", "right bottom").

      Specified by:
        `setMy` in interface `IMenu`

    - #### getMy

          public java.lang.String getMy()

      Return the value of the `my` property.

      Contents: When position is dynamic, this attribute specifies the corner of the menu to align with the trigger element. The format is "<left|right> <top|bottom>" (examples: "left top", "right bottom"). Default = 'left top'.

      Specified by:
        `getMy` in interface `IMenu`

    - #### setPosition

          public void setPosition(java.lang.String position)

      Set the value of the `position` property.

      Contents: Sets the way the menu is placed on the page. When "static", the menu is displayed in the normal flow. When set to "dynamic", the menu is only displayed near the trigger component when the triggerEvent occurs. For the latter case, it is required to specify a trigger component.

      Specified by:
        `setPosition` in interface `IMenu`

    - #### getPosition

          public java.lang.String getPosition()

      Return the value of the `position` property.

      Contents: Sets the way the menu is placed on the page. When "static", the menu is displayed in the normal flow. When set to "dynamic", the menu is only displayed near the trigger component when the triggerEvent occurs. For the latter case, it is required to specify a trigger component. Default = 'static'.

      Specified by:
        `getPosition` in interface `IMenu`

    - #### setStyle

          public void setStyle(java.lang.String style)

      Set the value of the `style` property.

      Contents: Style of the main container element.

      Specified by:
        `setStyle` in interface `IMenu`

    - #### getStyle

          public java.lang.String getStyle()

      Return the value of the `style` property.

      Contents: Style of the main container element.

      Specified by:
        `getStyle` in interface `IMenu`

    - #### setStyleClass

          public void setStyleClass(java.lang.String styleClass)

      Set the value of the `styleClass` property.

      Contents: Style class of the main container element.

      Specified by:
        `setStyleClass` in interface `IMenu`

    - #### getStyleClass

          public java.lang.String getStyleClass()

      Return the value of the `styleClass` property.

      Contents: Style class of the main container element.

      Specified by:
        `getStyleClass` in interface `IMenu`

    - #### setTiered

          public void setTiered(boolean tiered)

      Set the value of the `tiered` property.

      Contents: Sets the tiered mode, when set to true menu will be rendered in different tiers.

      Specified by:
        `setTiered` in interface `IMenu`

    - #### isTiered

          public boolean isTiered()

      Return the value of the `tiered` property.

      Contents: Sets the tiered mode, when set to true menu will be rendered in different tiers.

      Specified by:
        `isTiered` in interface `IMenu`

    - #### setTrigger

          public void setTrigger(java.lang.String trigger)

      Set the value of the `trigger` property.

      Contents: Server-side id of the component that will trigger the dynamic menu when the triggerEvent occurs. Used when position is dynamic. It is also possible to specify a client-side id of a plain HTML element on the page.

      Specified by:
        `setTrigger` in interface `IMenu`

    - #### getTrigger

          public java.lang.String getTrigger()

      Return the value of the `trigger` property.

      Contents: Server-side id of the component that will trigger the dynamic menu when the triggerEvent occurs. Used when position is dynamic. It is also possible to specify a client-side id of a plain HTML element on the page.

      Specified by:
        `getTrigger` in interface `IMenu`

    - #### setTriggerEvent

          public void setTriggerEvent(java.lang.String triggerEvent)

      Set the value of the `triggerEvent` property.

      Contents: Event that will trigger the menu to show, when position is dynamic. The possible values are "click", "mouseenter", "dblclick", and "rtclick".

      Specified by:
        `setTriggerEvent` in interface `IMenu`

    - #### getTriggerEvent

          public java.lang.String getTriggerEvent()

      Return the value of the `triggerEvent` property.

      Contents: Event that will trigger the menu to show, when position is dynamic. The possible values are "click", "mouseenter", "dblclick", and "rtclick". Default = 'click'.

      Specified by:
        `getTriggerEvent` in interface `IMenu`

    - #### setType

          public void setType(java.lang.String type)

      Set the value of the `type` property.

      Contents: Type of menu, valid values are "plain", "tiered" and "sliding".

      Specified by:
        `setType` in interface `IMenu`

    - #### getType

          public java.lang.String getType()

      Return the value of the `type` property.

      Contents: Type of menu, valid values are "plain", "tiered" and "sliding". Default = 'plain'.

      Specified by:
        `getType` in interface `IMenu`

    - #### setWidgetVar

          public void setWidgetVar(java.lang.String widgetVar)

      Set the value of the `widgetVar` property.

      Contents: Javascript variable name of the wrapped widget.

      Specified by:
        `setWidgetVar` in interface `IMenu`

    - #### getWidgetVar

          public java.lang.String getWidgetVar()

      Return the value of the `widgetVar` property.

      Contents: Javascript variable name of the wrapped widget.

      Specified by:
        `getWidgetVar` in interface `IMenu`

    - #### setZindex

          public void setZindex(int zindex)

      Set the value of the `zindex` property.

      Contents: zindex property to control overlapping with other elements.

      Specified by:
        `setZindex` in interface `IMenu`

    - #### getZindex

          public int getZindex()

      Return the value of the `zindex` property.

      Contents: zindex property to control overlapping with other elements. Default = '1'.

      Specified by:
        `getZindex` in interface `IMenu`

    - #### setForceUpdateCounter

          public void setForceUpdateCounter(java.lang.Integer forceUpdateCounter)

      Set the value of the `forceUpdateCounter` property.

      Specified by:
        `setForceUpdateCounter` in interface `IMenu`

    - #### getForceUpdateCounter

          public java.lang.Integer getForceUpdateCounter()

      Return the value of the `forceUpdateCounter` property.

      Specified by:
        `getForceUpdateCounter` in interface `IMenu`

    - #### setSubmenuLabels

          public void setSubmenuLabels(java.lang.String submenuLabels)

      Set the value of the `submenuLabels` property.

      Specified by:
        `setSubmenuLabels` in interface `IMenu`

    - #### getSubmenuLabels

          public java.lang.String getSubmenuLabels()

      Return the value of the `submenuLabels` property.

      Specified by:
        `getSubmenuLabels` in interface `IMenu`

    - #### 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`

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