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:
javax.faces.component.ActionSource, javax.faces.component.StateHolder, UserRoleAware

public class UINavigationMenuItem
extends AbstractUINavigationMenuItem


Field Summary
static java.lang.String COMPONENT_FAMILY
           
static java.lang.String COMPONENT_TYPE
           
 
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.faces.el.MethodBinding getAction()
          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 restoreState(javax.faces.context.FacesContext facesContext, java.lang.Object state)
           
 java.lang.Object saveState(javax.faces.context.FacesContext facesContext)
           
 void setAction(javax.faces.el.MethodBinding action)
           
 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, getActionListeners, getActiveDirectly, getActiveOnViewIdsDirectly, isRendered, removeActionListener, setRendered, toggleActive
 
Methods inherited from class javax.faces.component.UISelectItem
getItemDescription, getItemLabel, getItemValue, getValue, isItemDisabled, setItemDescription, setItemDisabled, setItemLabel, setItemValue, setValue
 
Methods inherited from class javax.faces.component.UIComponentBase
addFacesListener, decode, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientId, getFacesContext, getFacesListeners, getFacet, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendererType, getRendersChildren, getValueBinding, isTransient, processDecodes, processRestoreState, processSaveState, processUpdates, processValidators, queueEvent, removeFacesListener, restoreAttachedState, saveAttachedState, setId, setParent, setRendererType, setTransient, setValueBinding
 
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)

getAction

public javax.faces.el.MethodBinding getAction()
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:
getAction in interface javax.faces.component.ActionSource
Specified by:
getAction in class AbstractUINavigationMenuItem

setAction

public void setAction(javax.faces.el.MethodBinding action)
Specified by:
setAction in interface javax.faces.component.ActionSource
Specified by:
setAction 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)

saveState

public java.lang.Object saveState(javax.faces.context.FacesContext facesContext)
Specified by:
saveState in interface javax.faces.component.StateHolder
Overrides:
saveState in class AbstractUINavigationMenuItem

restoreState

public void restoreState(javax.faces.context.FacesContext facesContext,
                         java.lang.Object state)
Specified by:
restoreState in interface javax.faces.component.StateHolder
Overrides:
restoreState in class AbstractUINavigationMenuItem


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