org.apache.myfaces.custom.navmenu
Class UINavigationMenuItem

java.lang.Object
  extended by javax.faces.component.UIComponent
      extended by javax.faces.component.UIComponentBase
          extended by javax.faces.component.UISelectItem
              extended by org.apache.myfaces.custom.navmenu.AbstractUINavigationMenuItem
                  extended by org.apache.myfaces.custom.navmenu.UINavigationMenuItem
All Implemented Interfaces:
java.util.EventListener, javax.faces.component.ActionSource, javax.faces.component.PartialStateHolder, javax.faces.component.StateHolder, javax.faces.event.ComponentSystemEventListener, javax.faces.event.FacesListener, javax.faces.event.SystemEventListenerHolder, UserRoleAware

public class UINavigationMenuItem
extends AbstractUINavigationMenuItem


Nested Class Summary
protected static class UINavigationMenuItem.PropertyKeys
           
 
Field Summary
static java.lang.String COMPONENT_FAMILY
           
static java.lang.String COMPONENT_TYPE
           
 
Fields inherited from class javax.faces.component.UIComponent
BEANINFO_KEY, bindings, COMPOSITE_COMPONENT_TYPE_KEY, COMPOSITE_FACET_NAME, CURRENT_COMPONENT, CURRENT_COMPOSITE_COMPONENT, FACETS_KEY, VIEW_LOCATION_KEY
 
Fields inherited from interface org.apache.myfaces.component.UserRoleAware
ENABLED_ON_USER_ROLE_ATTR, VISIBLE_ON_USER_ROLE_ATTR
 
Constructor Summary
UINavigationMenuItem()
           
 
Method Summary
 javax.el.MethodExpression getActionExpression()
          Specifies the action to take when this command is invoked.
 javax.faces.el.MethodBinding getActionListener()
          A method binding EL expression that identifies an action listener method to be invoked if this component is activated by the user.
 java.lang.String getActiveOnViewIds()
           
 java.lang.String getDisabledStyle()
          CSS-Style Attribute to render when disabled is true
 java.lang.String getDisabledStyleClass()
          CSS-Style Class to use when disabled is true
 java.lang.String getEnabledOnUserRole()
          If user is in given role, this component will be rendered normally.
 java.lang.String getExternalLink()
           
 java.lang.String getFamily()
           
 java.lang.String getIcon()
           
protected  java.lang.String getLocalActiveOnViewIds()
           
 java.lang.String getTarget()
           
 java.lang.String getVisibleOnUserRole()
          If user is in given role, this component will be rendered normally.
 boolean isActive()
           
 boolean isDisabled()
          When set instead of a Hyperlink a span tag is rendered in the corresponding Component
 boolean isImmediate()
           
 boolean isOpen()
           
 boolean isSplit()
           
 void setActionExpression(javax.el.MethodExpression actionExpression)
           
 void setActionListener(javax.faces.el.MethodBinding actionListener)
           
 void setActive(boolean active)
           
 void setActiveOnViewIds(java.lang.String activeOnViewIds)
           
 void setDisabled(boolean disabled)
           
 void setDisabledStyle(java.lang.String disabledStyle)
           
 void setDisabledStyleClass(java.lang.String disabledStyleClass)
           
 void setEnabledOnUserRole(java.lang.String enabledOnUserRole)
           
 void setExternalLink(java.lang.String externalLink)
           
 void setIcon(java.lang.String icon)
           
 void setImmediate(boolean immediate)
           
 void setOpen(boolean open)
           
 void setSplit(boolean split)
           
 void setTarget(java.lang.String target)
           
 void setVisibleOnUserRole(java.lang.String visibleOnUserRole)
           
 
Methods inherited from class org.apache.myfaces.custom.navmenu.AbstractUINavigationMenuItem
addActionListener, broadcast, deactivateAll, deactivateChildren, getAction, getActionListeners, getActiveDirectly, getActiveOnViewIdsDirectly, isRendered, removeActionListener, setAction, toggleActive
 
Methods inherited from class javax.faces.component.UISelectItem
getItemDescription, getItemLabel, getItemValue, getValue, isItemDisabled, isItemEscaped, isNoSelectionOption, setItemDescription, setItemDisabled, setItemEscaped, setItemLabel, setItemValue, setNoSelectionOption, setRendered, setValue
 
Methods inherited from class javax.faces.component.UIComponentBase
addClientBehavior, addFacesListener, clearInitialState, decode, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientBehaviors, getClientId, getDefaultEventName, getEventNames, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendererType, getRendersChildren, getValueBinding, initialStateMarked, invokeOnComponent, isTransient, markInitialState, processDecodes, processRestoreState, processSaveState, processUpdates, processValidators, queueEvent, removeFacesListener, restoreAttachedState, restoreState, saveAttachedState, saveState, setId, setParent, setRendererType, setTransient, setValueBinding, visitTree
 
Methods inherited from class javax.faces.component.UIComponent
encodeAll, getClientId, getCompositeComponentParent, getContainerClientId, getCurrentComponent, getCurrentCompositeComponent, getListenersForEventClass, getNamingContainer, getResourceBundleMap, getStateHelper, getStateHelper, getValueExpression, isCompositeComponent, isInView, isVisitable, popComponentFromEL, processEvent, pushComponentToEL, setInView, setValueExpression, subscribeToEvent, unsubscribeFromEvent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COMPONENT_FAMILY

public static final java.lang.String COMPONENT_FAMILY
See Also:
Constant Field Values

COMPONENT_TYPE

public static final java.lang.String COMPONENT_TYPE
See Also:
Constant Field Values
Constructor Detail

UINavigationMenuItem

public UINavigationMenuItem()
Method Detail

getFamily

public java.lang.String getFamily()
Overrides:
getFamily in class AbstractUINavigationMenuItem

getIcon

public java.lang.String getIcon()
Specified by:
getIcon in class AbstractUINavigationMenuItem

setIcon

public void setIcon(java.lang.String icon)

isSplit

public boolean isSplit()
Specified by:
isSplit in class AbstractUINavigationMenuItem

setSplit

public void setSplit(boolean split)

isOpen

public boolean isOpen()
Specified by:
isOpen in class AbstractUINavigationMenuItem

setOpen

public void setOpen(boolean open)
Specified by:
setOpen in class AbstractUINavigationMenuItem

isActive

public boolean isActive()
Specified by:
isActive in class AbstractUINavigationMenuItem

setActive

public void setActive(boolean active)
Specified by:
setActive in class AbstractUINavigationMenuItem

isImmediate

public boolean isImmediate()
Specified by:
isImmediate in interface javax.faces.component.ActionSource
Specified by:
isImmediate in class AbstractUINavigationMenuItem

setImmediate

public void setImmediate(boolean immediate)

getExternalLink

public java.lang.String getExternalLink()
Specified by:
getExternalLink in class AbstractUINavigationMenuItem

setExternalLink

public void setExternalLink(java.lang.String externalLink)

getActionExpression

public javax.el.MethodExpression getActionExpression()
Description copied from class: AbstractUINavigationMenuItem
Specifies the action to take when this command is invoked. If the value is an expression, it is expected to be a method binding EL expression that identifies an action method. An action method accepts no parameters and has a String return value, called the action outcome, that identifies the next view displayed. The phase that this event is fired in can be controlled via the immediate attribute. If the value is a string literal, it is treated as a navigation outcome for the current view. This is functionally equivalent to a reference to an action method that returns the string literal.

Specified by:
getActionExpression in class AbstractUINavigationMenuItem

setActionExpression

public void setActionExpression(javax.el.MethodExpression actionExpression)
Specified by:
setActionExpression in class AbstractUINavigationMenuItem

getActionListener

public javax.faces.el.MethodBinding getActionListener()
Description copied from class: AbstractUINavigationMenuItem
A method binding EL expression that identifies an action listener method to be invoked if this component is activated by the user. An action listener method accepts a parameter of type javax.faces.event.ActionEvent and returns void. The phase that this event is fired in can be controlled via the immediate attribute.

Specified by:
getActionListener in interface javax.faces.component.ActionSource
Specified by:
getActionListener in class AbstractUINavigationMenuItem

setActionListener

public void setActionListener(javax.faces.el.MethodBinding actionListener)
Specified by:
setActionListener in interface javax.faces.component.ActionSource
Specified by:
setActionListener in class AbstractUINavigationMenuItem

getTarget

public java.lang.String getTarget()
Specified by:
getTarget in class AbstractUINavigationMenuItem

setTarget

public void setTarget(java.lang.String target)

isDisabled

public boolean isDisabled()
Description copied from class: AbstractUINavigationMenuItem
When set instead of a Hyperlink a span tag is rendered in the corresponding Component

Specified by:
isDisabled in class AbstractUINavigationMenuItem

setDisabled

public void setDisabled(boolean disabled)

getDisabledStyle

public java.lang.String getDisabledStyle()
Description copied from class: AbstractUINavigationMenuItem
CSS-Style Attribute to render when disabled is true

Specified by:
getDisabledStyle in class AbstractUINavigationMenuItem

setDisabledStyle

public void setDisabledStyle(java.lang.String disabledStyle)

getDisabledStyleClass

public java.lang.String getDisabledStyleClass()
Description copied from class: AbstractUINavigationMenuItem
CSS-Style Class to use when disabled is true

Specified by:
getDisabledStyleClass in class AbstractUINavigationMenuItem

setDisabledStyleClass

public void setDisabledStyleClass(java.lang.String disabledStyleClass)

getLocalActiveOnViewIds

protected final java.lang.String getLocalActiveOnViewIds()
Specified by:
getLocalActiveOnViewIds in class AbstractUINavigationMenuItem

getActiveOnViewIds

public java.lang.String getActiveOnViewIds()
Specified by:
getActiveOnViewIds in class AbstractUINavigationMenuItem

setActiveOnViewIds

public void setActiveOnViewIds(java.lang.String activeOnViewIds)

getEnabledOnUserRole

public java.lang.String getEnabledOnUserRole()
Description copied from interface: UserRoleAware
If user is in given role, this component will be rendered normally. If not, no hyperlink is rendered but all nested tags (=body) are rendered.

Returns:

setEnabledOnUserRole

public void setEnabledOnUserRole(java.lang.String enabledOnUserRole)

getVisibleOnUserRole

public java.lang.String getVisibleOnUserRole()
Description copied from interface: UserRoleAware
If user is in given role, this component will be rendered normally. If not, nothing is rendered and the body of this tag will be skipped.

Returns:

setVisibleOnUserRole

public void setVisibleOnUserRole(java.lang.String visibleOnUserRole)


Copyright © 2011 The Apache Software Foundation. All Rights Reserved.