org.omnifaces.component.output
Class Cache
java.lang.Object
javax.faces.component.UIComponent
javax.faces.component.UIComponentBase
org.omnifaces.component.output.OutputFamily
org.omnifaces.component.output.Cache
- All Implemented Interfaces:
- java.util.EventListener, javax.faces.component.PartialStateHolder, javax.faces.component.StateHolder, javax.faces.event.ComponentSystemEventListener, javax.faces.event.FacesListener, javax.faces.event.SystemEventListenerHolder
public class Cache
- extends OutputFamily
Cache is a component that captures the mark-up rendered by its children and caches this for future
requests.
- Since:
- 1.1
- Author:
- Arjan Tijms
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 |
Cache()
|
Method Summary |
void |
encodeChildren(javax.faces.context.FacesContext context)
|
java.lang.Object |
getCacheAttribute(javax.faces.context.FacesContext context,
java.lang.String name)
Gets a named attribute associated with the main cache entry this component is using to store
the rendering of its child components. |
java.lang.String |
getKey()
|
java.lang.String |
getScope()
|
java.lang.Integer |
getTime()
|
java.lang.Boolean |
isReset()
|
java.lang.Boolean |
isUseBuffer()
|
protected boolean |
isVisitable(javax.faces.component.visit.VisitContext visitContext)
|
void |
setCacheAttribute(javax.faces.context.FacesContext context,
java.lang.String name,
java.lang.Object value)
Sets a named attribute associated with the main cache entry this component is using to store
the rendering of its child components. |
void |
setKey(java.lang.String keyValue)
|
void |
setReset(java.lang.Boolean resetValue)
|
void |
setScope(java.lang.String scopeValue)
|
void |
setTime(java.lang.Integer timeValue)
|
void |
setUseBuffer(java.lang.Boolean useBufferValue)
|
Methods inherited from class javax.faces.component.UIComponentBase |
addClientBehavior, addFacesListener, broadcast, clearInitialState, decode, encodeBegin, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientBehaviors, getClientId, getDefaultEventName, getEventNames, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendererType, getValueBinding, invokeOnComponent, isRendered, isTransient, markInitialState, processDecodes, processRestoreState, processSaveState, processUpdates, processValidators, queueEvent, removeFacesListener, restoreAttachedState, restoreState, saveAttachedState, saveState, setId, setParent, setRendered, setRendererType, setTransient, setValueBinding |
Methods inherited from class javax.faces.component.UIComponent |
encodeAll, getClientId, getCompositeComponentParent, getContainerClientId, getCurrentComponent, getCurrentCompositeComponent, getListenersForEventClass, getNamingContainer, getResourceBundleMap, getStateHelper, getStateHelper, getValueExpression, initialStateMarked, isCompositeComponent, isInView, popComponentFromEL, processEvent, pushComponentToEL, setInView, setValueExpression, subscribeToEvent, unsubscribeFromEvent, visitTree |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
COMPONENT_TYPE
public static final java.lang.String COMPONENT_TYPE
- See Also:
- Constant Field Values
VALUE_SET
public static final java.lang.String VALUE_SET
- See Also:
- Constant Field Values
DEFAULT_SCOPE
public static final java.lang.String DEFAULT_SCOPE
- See Also:
- Constant Field Values
START_CONTENT_MARKER
public static final java.lang.String START_CONTENT_MARKER
- See Also:
- Constant Field Values
END_CONTENT_MARKER
public static final java.lang.String END_CONTENT_MARKER
- See Also:
- Constant Field Values
Cache
public Cache()
encodeChildren
public void encodeChildren(javax.faces.context.FacesContext context)
throws java.io.IOException
- Overrides:
encodeChildren
in class javax.faces.component.UIComponentBase
- Throws:
java.io.IOException
getCacheAttribute
public java.lang.Object getCacheAttribute(javax.faces.context.FacesContext context,
java.lang.String name)
- Gets a named attribute associated with the main cache entry this component is using to store
the rendering of its child components.
- Parameters:
context
- the current FacesContextname
- name of the attribute to retrieve a value for
- Returns:
- value associated with the named attribute
- Since:
- 1.2
setCacheAttribute
public void setCacheAttribute(javax.faces.context.FacesContext context,
java.lang.String name,
java.lang.Object value)
- Sets a named attribute associated with the main cache entry this component is using to store
the rendering of its child components.
- Parameters:
context
- the current FacesContextname
- name of the attribute under which the value is storedvalue
- the value that is to be stored- Since:
- 1.2
isVisitable
protected boolean isVisitable(javax.faces.component.visit.VisitContext visitContext)
- Overrides:
isVisitable
in class javax.faces.component.UIComponent
getKey
public java.lang.String getKey()
setKey
public void setKey(java.lang.String keyValue)
getScope
public java.lang.String getScope()
setScope
public void setScope(java.lang.String scopeValue)
getTime
public java.lang.Integer getTime()
setTime
public void setTime(java.lang.Integer timeValue)
isUseBuffer
public java.lang.Boolean isUseBuffer()
setUseBuffer
public void setUseBuffer(java.lang.Boolean useBufferValue)
isReset
public java.lang.Boolean isReset()
setReset
public void setReset(java.lang.Boolean resetValue)