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

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 String COMPONENT_TYPE
           
static String DEFAULT_RENDERER_TYPE
           
 
Fields inherited from class javax.faces.component.UIOutput
COMPONENT_FAMILY
 
Constructor Summary
AbstractToggleLink()
           
 
Method Summary
abstract  String getEnabledOnUserRole()
          If user is in given role, this component will be rendered normally.
abstract  String getFor()
          The class which implements org.apache.myfaces.custom.dynamicResources.ResourceRenderer.
abstract  Boolean getForceId()
          If true, this component will force the use of the specified id when rendering.
abstract  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  String getOnClickFocusId()
          Id of the component that will be focused when toggleLink is clicked
abstract  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(String userRole)
           
abstract  void setForceId(Boolean forceId)
           
abstract  void setForceIdIndex(Boolean forceIdIndex)
           
abstract  void setVisibleOnUserRole(String userRole)
           
 
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, restoreState, saveState, 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, getFamily, 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_TYPE

public static final String COMPONENT_TYPE
See Also:
Constant Field Values

DEFAULT_RENDERER_TYPE

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

AbstractToggleLink

public AbstractToggleLink()
Method Detail

getFor

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

Returns:

getOnClickFocusId

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

Returns:

getForceId

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

Returns:

setForceId

public abstract void setForceId(Boolean forceId)

getForceIdIndex

public abstract 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(Boolean forceIdIndex)

getEnabledOnUserRole

public abstract 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(String userRole)

getVisibleOnUserRole

public abstract 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(String userRole)


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