|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.faces.component.UIComponent
javax.faces.component.UIComponentBase
org.apache.myfaces.custom.buffer.AbstractBuffer
@JSFComponent(name="t:buffer", clazz="org.apache.myfaces.custom.buffer.Buffer", tagClass="org.apache.myfaces.custom.buffer.BufferTag") @JSFJspProperties(properties={@JSFJspProperty(name="rendered",returnType="boolean",tagExcluded=true),@JSFJspProperty(name="binding",returnType="java.lang.String",tagExcluded=true),@JSFJspProperty(name="id",returnType="java.lang.String",tagExcluded=true)}) public abstract class AbstractBuffer
A component that renders its child components into an in-memory buffer rather than render them directly to the response stream.
Property "into" is an EL expression that specifies where to store a String holding the results of rendering all the children of this component; this is assigned to after rendering of this component (and its children) is complete.
Typically, an h:output tag is then used later in the same page to output the buffer contents.
This can be useful with JSF1.1/JSP2.0 to work around the well-known problem where on first render of a page, a component "A" cannot reference a component "B" which is defined later in the page because it has not yet been created. A solution is to define "B" before "A", but wrapped in a Buffer component. Component A can then be rendered and successfully reference "B" because it now exists. And later in the page, the buffer contents can then be output, preserving the original layout.
This can also be useful when rendering the same data block multiple times within a page. For example, a datatable can be rendered with a datascroller both before and after it; first render the table into a buffer B1, then render the datascroller into a buffer B2, then output buffers B2,B1,B2.
Field Summary | |
---|---|
static java.lang.String |
COMPONENT_FAMILY
|
static java.lang.String |
COMPONENT_TYPE
|
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 | |
---|---|
AbstractBuffer()
|
Method Summary | |
---|---|
protected abstract java.lang.String |
getInto()
An EL expression that specifies where to store a String holding the results of rendering all the children of this component; this is assigned to after rendering of this component (and its children) is complete. |
protected abstract java.lang.String |
getLocalInto()
|
abstract void |
setInto(java.lang.String into)
|
Methods inherited from class javax.faces.component.UIComponentBase |
---|
addClientBehavior, addFacesListener, broadcast, clearInitialState, decode, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientBehaviors, getClientId, getDefaultEventName, getEventNames, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendererType, getRendersChildren, getValueBinding, initialStateMarked, invokeOnComponent, isRendered, isTransient, markInitialState, processDecodes, processRestoreState, processSaveState, processUpdates, processValidators, queueEvent, removeFacesListener, restoreAttachedState, restoreState, saveAttachedState, saveState, setId, setParent, setRendered, setRendererType, setTransient, setValueBinding, visitTree |
Methods inherited from class javax.faces.component.UIComponent |
---|
encodeAll, getClientId, getCompositeComponentParent, getContainerClientId, getCurrentComponent, getCurrentCompositeComponent, getFamily, 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 |
Field Detail |
---|
public static final java.lang.String COMPONENT_TYPE
public static final java.lang.String COMPONENT_FAMILY
Constructor Detail |
---|
public AbstractBuffer()
Method Detail |
---|
protected abstract java.lang.String getLocalInto()
public abstract void setInto(java.lang.String into)
@JSFProperty(required=true, localMethod=true) protected abstract java.lang.String getInto()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |