org.apache.myfaces.custom.toggle
Class ToggleLink

java.lang.Object
  extended by javax.faces.component.UIComponent
      extended by javax.faces.component.UIComponentBase
          extended by javax.faces.component.UIOutput
              extended by javax.faces.component.html.HtmlOutputLink
                  extended by org.apache.myfaces.custom.toggle.AbstractToggleLink
                      extended by org.apache.myfaces.custom.toggle.ToggleLink
All Implemented Interfaces:
javax.faces.component.StateHolder, javax.faces.component.ValueHolder

public class ToggleLink
extends AbstractToggleLink


Field Summary
static java.lang.String COMPONENT_FAMILY
           
static java.lang.String COMPONENT_TYPE
           
static java.lang.String DEFAULT_RENDERER_TYPE
           
 
Constructor Summary
ToggleLink()
           
 
Method Summary
 java.lang.String getEnabledOnUserRole()
          If user is in given role, this component will be rendered normally.
 java.lang.String getFamily()
           
 java.lang.String getFor()
          The class which implements org.apache.myfaces.custom.dynamicResources.ResourceRenderer.
 java.lang.Boolean getForceId()
          If true, this component will force the use of the specified id when rendering.
 java.lang.Boolean getForceIdIndex()
          If false, this component will not append a '[n]' suffix (where 'n' is the row index) to components that are contained within a "list." This value will be true by default and the value will be ignored if the value of forceId is false (or not specified.)
 java.lang.String getOnClickFocusId()
          Id of the component that will be focused when toggleLink is clicked
 java.lang.String getVisibleOnUserRole()
          If user is in given role, this component will be rendered normally.
 boolean isDisabled()
          HTML: When true, this element cannot receive focus.
 void restoreState(javax.faces.context.FacesContext facesContext, java.lang.Object state)
           
 java.lang.Object saveState(javax.faces.context.FacesContext facesContext)
           
 void setDisabled(boolean disabled)
           
 void setEnabledOnUserRole(java.lang.String enabledOnUserRole)
           
 void setFor(java.lang.String forParam)
           
 void setForceId(java.lang.Boolean forceId)
           
 void setForceIdIndex(java.lang.Boolean forceIdIndex)
           
 void setOnClickFocusId(java.lang.String onClickFocusId)
           
 void setVisibleOnUserRole(java.lang.String visibleOnUserRole)
           
 
Methods inherited from class javax.faces.component.html.HtmlOutputLink
getAccesskey, getCharset, getCoords, getDir, getHreflang, getLang, getOnblur, getOnclick, getOndblclick, getOnfocus, getOnkeydown, getOnkeypress, getOnkeyup, getOnmousedown, getOnmousemove, getOnmouseout, getOnmouseover, getOnmouseup, getRel, getRev, getShape, getStyle, getStyleClass, getTabindex, getTarget, getTitle, getType, setAccesskey, setCharset, setCoords, setDir, setHreflang, setLang, setOnblur, setOnclick, setOndblclick, setOnfocus, setOnkeydown, setOnkeypress, setOnkeyup, setOnmousedown, setOnmousemove, setOnmouseout, setOnmouseover, setOnmouseup, setRel, setRev, setShape, setStyle, setStyleClass, setTabindex, setTarget, setTitle, setType
 
Methods inherited from class javax.faces.component.UIOutput
getConverter, getLocalValue, getValue, setConverter, setValue
 
Methods inherited from class javax.faces.component.UIComponentBase
addFacesListener, broadcast, decode, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientId, getFacesContext, getFacesListeners, getFacet, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendererType, getRendersChildren, getValueBinding, isRendered, isTransient, processDecodes, processRestoreState, processSaveState, processUpdates, processValidators, queueEvent, removeFacesListener, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, 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

DEFAULT_RENDERER_TYPE

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

ToggleLink

public ToggleLink()
Method Detail

getFamily

public java.lang.String getFamily()
Overrides:
getFamily in class javax.faces.component.UIOutput

getFor

public java.lang.String getFor()
Description copied from class: AbstractToggleLink
The class which implements org.apache.myfaces.custom.dynamicResources.ResourceRenderer. The resource renderer is responsible for resource the image. The class must have a default constructor. Any request scoped attribute or managed bean is not available when this resource renderer is instantiated and used. The resource renderer must render the binary data for the resource by using the parameters passed by nested f:param elements and/or using session or application scoped beans.

Specified by:
getFor in class AbstractToggleLink
Returns:

setFor

public void setFor(java.lang.String forParam)

isDisabled

public boolean isDisabled()
Description copied from class: AbstractToggleLink
HTML: When true, this element cannot receive focus.

Specified by:
isDisabled in class AbstractToggleLink
Returns:

setDisabled

public void setDisabled(boolean disabled)

getOnClickFocusId

public java.lang.String getOnClickFocusId()
Description copied from class: AbstractToggleLink
Id of the component that will be focused when toggleLink is clicked

Specified by:
getOnClickFocusId in class AbstractToggleLink
Returns:

setOnClickFocusId

public void setOnClickFocusId(java.lang.String onClickFocusId)

getForceId

public java.lang.Boolean getForceId()
Description copied from class: AbstractToggleLink
If true, this component will force the use of the specified id when rendering.

Specified by:
getForceId in class AbstractToggleLink
Returns:

setForceId

public void setForceId(java.lang.Boolean forceId)
Specified by:
setForceId in class AbstractToggleLink

getForceIdIndex

public java.lang.Boolean getForceIdIndex()
Description copied from class: AbstractToggleLink
If false, this component will not append a '[n]' suffix (where 'n' is the row index) to components that are contained within a "list." This value will be true by default and the value will be ignored if the value of forceId is false (or not specified.)

Specified by:
getForceIdIndex in class AbstractToggleLink
Returns:

setForceIdIndex

public void setForceIdIndex(java.lang.Boolean forceIdIndex)
Specified by:
setForceIdIndex in class AbstractToggleLink

getEnabledOnUserRole

public java.lang.String getEnabledOnUserRole()
Description copied from class: AbstractToggleLink
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.

Specified by:
getEnabledOnUserRole in class AbstractToggleLink
Returns:

setEnabledOnUserRole

public void setEnabledOnUserRole(java.lang.String enabledOnUserRole)
Specified by:
setEnabledOnUserRole in class AbstractToggleLink

getVisibleOnUserRole

public java.lang.String getVisibleOnUserRole()
Description copied from class: AbstractToggleLink
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.

Specified by:
getVisibleOnUserRole in class AbstractToggleLink
Returns:

setVisibleOnUserRole

public void setVisibleOnUserRole(java.lang.String visibleOnUserRole)
Specified by:
setVisibleOnUserRole in class AbstractToggleLink

saveState

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

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 javax.faces.component.html.HtmlOutputLink


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