com.icesoft.faces.component.menubar

## Class MenuBar

- java.lang.Object
- - javax.faces.component.UIComponent
  - - javax.faces.component.UIComponentBase
    - - javax.faces.component.UICommand
      - - com.icesoft.faces.component.menubar.MenuBar

- All Implemented Interfaces:
    java.util.EventListener, javax.faces.component.ActionSource, javax.faces.component.ActionSource2, javax.faces.component.NamingContainer, javax.faces.component.PartialStateHolder, javax.faces.component.StateHolder, javax.faces.component.TransientStateHolder, javax.faces.event.ComponentSystemEventListener, javax.faces.event.FacesListener, javax.faces.event.SystemEventListenerHolder
  Direct Known Subclasses:
    MenuPopup

      public class MenuBar
      extends javax.faces.component.UICommand
      implements javax.faces.component.NamingContainer

  MenuBar is a JSF component class representing the ICEfaces menu bar.

  The menuBar component provides a robust menu system that supports:

  1. Nested child menuItem and menuItemSeparator components. Support for menuItemCheckbox and menuItemRadio components are planned for a future release.
  2. Horizontal (default) and Vertical menu orientations. Defines whether the submenus of the top-level menu items appear beside or below the top-level menu items.
  3. Definition of the heirarchy of menu items and their submenus in one of two ways:
  - by using a binding to a bean method that returns a (potentially) dynamic heirarchy of menu items.
  - by statically defining the heirarchy in the JSPX page.
  4. The action attribute of the contained menuItem tags or instances can be defined to indicate a string or a backing bean method that can be used in application navigation.
  5. The actionListener attribute of the contained menuItem tags or instances can be defined to indicate an actionListener that resides in a backing bean.

  This component extends the JSF UICommand component and implements the NamingContainer interface.

  By default the MenuBar is rendered by the "com.icesoft.faces.View" renderer type.
  Version:
    1.1
  Author:
    Chris Brown, gmccleary

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `DEFAULT_ORIENTATION` String contant default orientation
    `static java.lang.String` | `ID_PREFIX` String constant menu id prefix
    `static java.lang.String` | `ORIENTATION_HORIZONTAL` String contant horizontal orientation
    `static java.lang.String` | `ORIENTATION_VERTICAL` String constant vertical orientation

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

      `COMPONENT_FAMILY, COMPONENT_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`

    - ### Fields inherited from interface javax.faces.component.NamingContainer

      `SEPARATOR_CHAR`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MenuBar()` default no args constructor

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `broadcast(javax.faces.event.FacesEvent event)`
    `void` | `encodeBegin(javax.faces.context.FacesContext context)`
    `java.lang.String` | `getComponentRootStyle()`
    `java.lang.String` | `getComponentType()`
    `java.lang.String` | `getFamily()` Return the value of the `COMPONENT_FAMILY` of this component.
    `java.lang.String` | `getImageDir()` Return the value of the `imageDir` property.
    `java.lang.String` | `getItemImageStyleClass()`
    `java.lang.String` | `getItemLabelStyleClass()`
    `java.lang.String` | `getItemStyleClass()`
    `java.lang.String` | `getJsCall(javax.faces.context.FacesContext context)`
    `java.lang.String` | `getNoIcons()` Return the value of the noIcons property.
    `java.lang.String` | `getOrientation()` Return the value of the `orientation` property.
    `java.lang.String` | `getRenderedOnUserRole()` Return the value of the `renderedOnUserRole` property.
    `java.lang.String` | `getRendererType()`
    `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` | `getSubMenuIndicatorStyleClass()`
    `java.lang.String` | `getSubMenuStyleClass()`
    `boolean` | `invokeOnComponent(javax.faces.context.FacesContext context, java.lang.String clientId, javax.faces.component.ContextCallback callback)`
    `boolean` | `isDisplayOnClick()`
    `boolean` | `isKeyboardNavigationEnabled()`
    `boolean` | `isRendered()` Return the value of the `rendered` property.
    `boolean` | `isScrollableDivMode()`
    `void` | `processDecodes(javax.faces.context.FacesContext context)`
    `void` | `queueEvent(javax.faces.event.FacesEvent e)`
    `void` | `restoreState(javax.faces.context.FacesContext context, java.lang.Object state)`
    `java.lang.Object` | `saveState(javax.faces.context.FacesContext context)`
    `void` | `setDisplayOnClick(boolean displayOnClick)`
    `void` | `setImageDir(java.lang.String imageDir)` Set the value of the `imageDir` property.
    `void` | `setKeyboardNavigationEnabled(boolean keyboardNavigationEnabled)`
    `void` | `setNoIcons(java.lang.String b)` Set the value of the noIcons property.
    `void` | `setOrientation(java.lang.String orient)` Set the value of the `orientation` property.
    `void` | `setRenderedOnUserRole(java.lang.String renderedOnUserRole)` Set the value of the `renderedOnUserRole` property.
    `void` | `setScrollableDivMode(boolean scrollableDivMode)`
    `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.

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

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

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

      `addClientBehavior, addFacesListener, clearInitialState, decode, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientBehaviors, getClientId, getDefaultEventName, getEventNames, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getListenersForEventClass, getParent, getRenderer, getRendersChildren, getValueBinding, isTransient, markInitialState, processRestoreState, processSaveState, processUpdates, processValidators, removeFacesListener, restoreAttachedState, saveAttachedState, 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, setValueExpression, visitTree`

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

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

- - ### Field Detail

    - #### ORIENTATION_VERTICAL

          public static final java.lang.String ORIENTATION_VERTICAL

      String constant vertical orientation
      See Also:
        Constant Field Values

    - #### ORIENTATION_HORIZONTAL

          public static final java.lang.String ORIENTATION_HORIZONTAL

      String contant horizontal orientation
      See Also:
        Constant Field Values

    - #### DEFAULT_ORIENTATION

          public static final java.lang.String DEFAULT_ORIENTATION

      String contant default orientation
      See Also:
        Constant Field Values

    - #### ID_PREFIX

          public static final java.lang.String ID_PREFIX

      String constant menu id prefix
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### MenuBar

          public MenuBar()

      default no args constructor

  - ### Method Detail

    - #### getFamily

          public java.lang.String getFamily()

      Return the value of the `COMPONENT_FAMILY` of this component.

      Overrides:
        `getFamily` in class `javax.faces.component.UICommand`
      Returns:
        String component family

    - #### getComponentType

          public java.lang.String getComponentType()

      Returns:
        String component type

    - #### getRendererType

          public java.lang.String getRendererType()

      Overrides:
        `getRendererType` in class `javax.faces.component.UIComponentBase`

    - #### getNoIcons

          public java.lang.String getNoIcons()

      Return the value of the noIcons property. A return value of "true" indicates that noIcons should be rendered on all of the MenuBar subMenus.
      Returns:
        String value of Boolean noIcons

    - #### setNoIcons

          public void setNoIcons(java.lang.String b)

      Set the value of the noIcons property. Setting this value to "true" will cause all subMenus of this MenuBar to be rendered without icons and spacers.
      Parameters:
        `b` -

    - #### setStyle

          public void setStyle(java.lang.String style)

      Set the value of the `style` property.

      Parameters:
        `style` -

    - #### getStyle

          public java.lang.String getStyle()

      Return the value of the `style` property.

      Returns:
        String style

    - #### getImageDir

          public java.lang.String getImageDir()

      Return the value of the `imageDir` property.

      Returns:
        String imageDir

    - #### setImageDir

          public void setImageDir(java.lang.String imageDir)

      Set the value of the `imageDir` property.

      Parameters:
        `imageDir` -

    - #### getOrientation

          public java.lang.String getOrientation()

      Return the value of the `orientation` property.

      Returns:
        String orientation

    - #### setOrientation

          public void setOrientation(java.lang.String orient)

      Set the value of the `orientation` property.

      Parameters:
        `orient` -

    - #### processDecodes

          public void processDecodes(javax.faces.context.FacesContext context)

      Overrides:
        `processDecodes` in class `javax.faces.component.UIComponentBase`

    - #### queueEvent

          public void queueEvent(javax.faces.event.FacesEvent e)

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

    - #### broadcast

          public void broadcast(javax.faces.event.FacesEvent event)
                         throws javax.faces.event.AbortProcessingException

      Overrides:
        `broadcast` in class `javax.faces.component.UICommand`
      Throws:
        `javax.faces.event.AbortProcessingException`

    - #### setRenderedOnUserRole

          public void setRenderedOnUserRole(java.lang.String renderedOnUserRole)

      Set the value of the `renderedOnUserRole` property.

      Parameters:
        `renderedOnUserRole` -

    - #### getRenderedOnUserRole

          public java.lang.String getRenderedOnUserRole()

      Return the value of the `renderedOnUserRole` property.

      Returns:
        String renderedOnUserRole

    - #### isRendered

          public boolean isRendered()

      Return the value of the `rendered` property.

      Overrides:
        `isRendered` in class `javax.faces.component.UIComponentBase`
      Returns:
        boolean rendered

    - #### setStyleClass

          public void setStyleClass(java.lang.String styleClass)

      Set the value of the `styleClass` property.

      Parameters:
        `styleClass` -

    - #### getStyleClass

          public java.lang.String getStyleClass()

      Return the value of the `styleClass` property.

      Returns:
        String styleClass

    - #### getItemStyleClass

          public java.lang.String getItemStyleClass()

    - #### getItemLabelStyleClass

          public java.lang.String getItemLabelStyleClass()

    - #### getItemImageStyleClass

          public java.lang.String getItemImageStyleClass()

    - #### getSubMenuStyleClass

          public java.lang.String getSubMenuStyleClass()

    - #### getSubMenuIndicatorStyleClass

          public java.lang.String getSubMenuIndicatorStyleClass()

    - #### getComponentRootStyle

          public java.lang.String getComponentRootStyle()

    - #### setDisplayOnClick

          public void setDisplayOnClick(boolean displayOnClick)

    - #### isDisplayOnClick

          public boolean isDisplayOnClick()

    - #### setScrollableDivMode

          public void setScrollableDivMode(boolean scrollableDivMode)

    - #### isScrollableDivMode

          public boolean isScrollableDivMode()

    - #### encodeBegin

          public void encodeBegin(javax.faces.context.FacesContext context)
                           throws java.io.IOException

      Overrides:
        `encodeBegin` in class `javax.faces.component.UIComponentBase`
      Throws:
        `java.io.IOException`

    - #### saveState

          public java.lang.Object saveState(javax.faces.context.FacesContext context)

      Specified by:
        `saveState` in interface `javax.faces.component.StateHolder`
      Overrides:
        `saveState` in class `javax.faces.component.UIComponentBase`

    - #### restoreState

          public void restoreState(javax.faces.context.FacesContext context,
                                   java.lang.Object state)

      Specified by:
        `restoreState` in interface `javax.faces.component.StateHolder`
      Overrides:
        `restoreState` in class `javax.faces.component.UIComponentBase`

    - #### invokeOnComponent

          public boolean invokeOnComponent(javax.faces.context.FacesContext context,
                                           java.lang.String clientId,
                                           javax.faces.component.ContextCallback callback)
                                    throws javax.faces.FacesException

      Overrides:
        `invokeOnComponent` in class `javax.faces.component.UIComponentBase`
      Throws:
        `javax.faces.FacesException`

    - #### isKeyboardNavigationEnabled

          public boolean isKeyboardNavigationEnabled()

    - #### setKeyboardNavigationEnabled

          public void setKeyboardNavigationEnabled(boolean keyboardNavigationEnabled)

    - #### getJsCall

          public java.lang.String getJsCall(javax.faces.context.FacesContext context)

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