Class MenuItemTag

java.lang.Object
javax.faces.component.UIComponent
javax.faces.component.UIComponentBase
javax.faces.component.UIOutput
org.apache.empire.jsf2.components.LinkTag
org.apache.empire.jsf2.components.MenuItemTag
All Implemented Interfaces:
EventListener, javax.faces.component.PartialStateHolder, javax.faces.component.StateHolder, javax.faces.component.TransientStateHolder, javax.faces.component.ValueHolder, javax.faces.event.ComponentSystemEventListener, javax.faces.event.FacesListener, javax.faces.event.SystemEventListenerHolder, TagEncodingHelperFactory.TagEncodingHolder

public class MenuItemTag extends LinkTag
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected String
     
    protected MenuListTag
     

    Fields inherited from class org.apache.empire.jsf2.components.LinkTag

    helper, SPAN_ELEM

    Fields inherited from class javax.faces.component.UIOutput

    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
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected String
    appendStyleClass(String styleClass, String newClass)
     
    protected boolean
     
    void
    encodeBegin(javax.faces.context.FacesContext context)
     
    void
    encodeChildren(javax.faces.context.FacesContext context)
     
    void
    encodeEnd(javax.faces.context.FacesContext context)
     
    protected void
    encodeLinkComponent(javax.faces.context.FacesContext context, javax.faces.component.html.HtmlOutcomeTargetLink linkComponent)
     
    protected MenuListTag
     
    final Object
    getAttribute(String attributeName)
     
     
    protected String
     
    protected Object
    getLinkValue(boolean hasColumn)
    Returns the menu item label Override this to e.g. provide the label from the PageDefinition
    final String
     
     
     
    boolean
     
    protected String
     
    boolean
     
    protected boolean
     
    boolean
     
    final boolean
     
    boolean
     
    boolean
     
    protected boolean
    Returns whether or not the MenuItem should be rendered Override this to implement custom logic
    void
     

    Methods inherited from class javax.faces.component.UIOutput

    clearInitialState, getConverter, getLocalValue, getValue, markInitialState, resetValue, restoreState, saveState, setConverter, setValue

    Methods inherited from class javax.faces.component.UIComponentBase

    addClientBehavior, addFacesListener, broadcast, decode, findComponent, getAttributes, getChildCount, getChildren, getClientBehaviors, getDefaultEventName, getEventNames, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getListenersForEventClass, getParent, getPassThroughAttributes, getRenderer, getRendererType, getValueBinding, invokeOnComponent, isTransient, processDecodes, processRestoreState, processSaveState, processUpdates, processValidators, queueEvent, removeFacesListener, restoreAttachedState, saveAttachedState, setParent, setRendered, setRendererType, setTransient, setValueBinding, subscribeToEvent, unsubscribeFromEvent

    Methods inherited from class javax.faces.component.UIComponent

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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • MenuItemTag

      public MenuItemTag()
  • Method Details

    • getFamily

      public String getFamily()
      Overrides:
      getFamily in class LinkTag
    • setId

      public void setId(String id)
      Overrides:
      setId in class LinkTag
    • isRendered

      public boolean isRendered()
      Overrides:
      isRendered in class javax.faces.component.UIComponentBase
    • getMenuItemId

      public final String getMenuItemId()
    • getParentMenu

      public final MenuListTag getParentMenu()
    • getAttribute

      public final Object getAttribute(String attributeName)
    • getPageDefinition

      public final PageDefinition getPageDefinition()
    • encodeBegin

      public void encodeBegin(javax.faces.context.FacesContext context) throws IOException
      Overrides:
      encodeBegin in class LinkTag
      Throws:
      IOException
    • getRendersChildren

      public boolean getRendersChildren()
      Overrides:
      getRendersChildren in class javax.faces.component.UIComponentBase
    • encodeChildren

      public void encodeChildren(javax.faces.context.FacesContext context) throws IOException
      Overrides:
      encodeChildren in class LinkTag
      Throws:
      IOException
    • encodeEnd

      public void encodeEnd(javax.faces.context.FacesContext context) throws IOException
      Overrides:
      encodeEnd in class LinkTag
      Throws:
      IOException
    • getLinkStyleClass

      protected String getLinkStyleClass()
      Overrides:
      getLinkStyleClass in class LinkTag
    • findParentMenu

      protected MenuListTag findParentMenu()
    • isCurrent

      public boolean isCurrent()
    • isParent

      public boolean isParent()
    • isItemDisabled

      public boolean isItemDisabled()
    • isItemExpanded

      public final boolean isItemExpanded()
    • isRenderItem

      protected boolean isRenderItem()
      Returns whether or not the MenuItem should be rendered Override this to implement custom logic
      Returns:
      true if the menu item should be rendered or false otherwise
    • detectItemExpanded

      protected boolean detectItemExpanded()
    • getStyleClass

      protected String getStyleClass()
    • appendStyleClass

      protected String appendStyleClass(String styleClass, String newClass)
    • isEncodeLinkChildren

      protected boolean isEncodeLinkChildren(Object linkValue)
      Overrides:
      isEncodeLinkChildren in class LinkTag
    • getLinkValue

      protected Object getLinkValue(boolean hasColumn)
      Returns the menu item label Override this to e.g. provide the label from the PageDefinition
      Overrides:
      getLinkValue in class LinkTag
      Returns:
      the menu item label
    • encodeLinkComponent

      protected void encodeLinkComponent(javax.faces.context.FacesContext context, javax.faces.component.html.HtmlOutcomeTargetLink linkComponent) throws IOException
      Overrides:
      encodeLinkComponent in class LinkTag
      Throws:
      IOException