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:
java.util.EventListener, javax.faces.component.behavior.ClientBehaviorHolder, javax.faces.component.PartialStateHolder, javax.faces.component.StateHolder, javax.faces.component.ValueHolder, javax.faces.event.ComponentSystemEventListener, javax.faces.event.FacesListener, javax.faces.event.SystemEventListenerHolder
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

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.faces.component.html.HtmlOutputLink
javax.faces.component.html.HtmlOutputLink.PropertyKeys
 
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
BEANINFO_KEY, bindings, COMPOSITE_COMPONENT_TYPE_KEY, COMPOSITE_FACET_NAME, CURRENT_COMPONENT, CURRENT_COMPOSITE_COMPONENT, FACETS_KEY, VIEW_LOCATION_KEY
 
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, getEventNames, getFamily, getFragment, 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, setDisabled, setFragment, 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
clearInitialState, getConverter, getLocalValue, getValue, markInitialState, restoreState, saveState, setConverter, setValue
 
Methods inherited from class javax.faces.component.UIComponentBase
addClientBehavior, addFacesListener, broadcast, decode, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientBehaviors, getClientId, getDefaultEventName, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendererType, getRendersChildren, getValueBinding, initialStateMarked, invokeOnComponent, isRendered, isTransient, processDecodes, processRestoreState, processSaveState, processUpdates, processValidators, queueEvent, removeFacesListener, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, 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
 
Methods inherited from interface javax.faces.component.behavior.ClientBehaviorHolder
addClientBehavior, getClientBehaviors, getDefaultEventName
 

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.