org.apache.myfaces.custom.toggle
Class AbstractToggleLink

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
All Implemented Interfaces:
javax.faces.component.StateHolder, javax.faces.component.ValueHolder
Direct Known Subclasses:
ToggleLink

public abstract class AbstractToggleLink
extends javax.faces.component.html.HtmlOutputLink

Extends standard outputLink but links to a dynamically rendered resource (image, file, ...). Should be nested within an HtmlToggleGroup component. Controls nested within this component will be displayed in 'view' mode, controls outside this component (within the parent HtmlToggleGroup) will be displayed in 'edit' mode.

Author:
Sharath Reddy

Field Summary
static java.lang.String COMPONENT_TYPE
           
static java.lang.String DEFAULT_RENDERER_TYPE
           
 
Fields inherited from class javax.faces.component.html.HtmlOutputLink
COMPONENT_FAMILY
 
Fields inherited from class javax.faces.component.UIComponent
bindings
 
Constructor Summary
AbstractToggleLink()
           
 
Method Summary
abstract  java.lang.String getEnabledOnUserRole()
          If user is in given role, this component will be rendered normally.
abstract  java.lang.String getFor()
          The class which implements org.apache.myfaces.custom.dynamicResources.ResourceRenderer.
abstract  java.lang.Boolean getForceId()
          If true, this component will force the use of the specified id when rendering.
abstract  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.)
abstract  java.lang.String getOnClickFocusId()
          Id of the component that will be focused when toggleLink is clicked
abstract  java.lang.String getVisibleOnUserRole()
          If user is in given role, this component will be rendered normally.
abstract  boolean isDisabled()
          HTML: When true, this element cannot receive focus.
abstract  void setEnabledOnUserRole(java.lang.String userRole)
           
abstract  void setForceId(java.lang.Boolean forceId)
           
abstract  void setForceIdIndex(java.lang.Boolean forceIdIndex)
           
abstract  void setVisibleOnUserRole(java.lang.String userRole)
           
 
Methods inherited from class javax.faces.component.html.HtmlOutputLink
getAccesskey, getCharset, getCoords, getDir, getFamily, getHreflang, getLang, getOnblur, getOnclick, getOndblclick, getOnfocus, getOnkeydown, getOnkeypress, getOnkeyup, getOnmousedown, getOnmousemove, getOnmouseout, getOnmouseover, getOnmouseup, getRel, getRev, getShape, getStyle, getStyleClass, getTabindex, getTarget, getTitle, getType, restoreState, saveState, setAccesskey, setCharset, setCoords, setDir, setDisabled, 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, getFacetCount, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendererType, getRendersChildren, getValueBinding, invokeOnComponent, isRendered, isTransient, processDecodes, processRestoreState, processSaveState, processUpdates, processValidators, queueEvent, removeFacesListener, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient, setValueBinding
 
Methods inherited from class javax.faces.component.UIComponent
encodeAll, getContainerClientId, getValueExpression, setValueExpression
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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

AbstractToggleLink

public AbstractToggleLink()
Method Detail

getFor

public abstract java.lang.String getFor()
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.

Returns:

isDisabled

public abstract boolean isDisabled()
HTML: When true, this element cannot receive focus.

Overrides:
isDisabled in class javax.faces.component.html.HtmlOutputLink
Returns:

getOnClickFocusId

public abstract java.lang.String getOnClickFocusId()
Id of the component that will be focused when toggleLink is clicked

Returns:

getForceId

public abstract java.lang.Boolean getForceId()
If true, this component will force the use of the specified id when rendering.

Returns:

setForceId

public abstract void setForceId(java.lang.Boolean forceId)

getForceIdIndex

public abstract 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.)

Returns:

setForceIdIndex

public abstract void setForceIdIndex(java.lang.Boolean forceIdIndex)

getEnabledOnUserRole

public abstract java.lang.String getEnabledOnUserRole()
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 abstract void setEnabledOnUserRole(java.lang.String userRole)

getVisibleOnUserRole

public abstract java.lang.String getVisibleOnUserRole()
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 abstract void setVisibleOnUserRole(java.lang.String userRole)


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