public class DeferredScript extends ScriptFamily
This will give bonus points with among others the Google PageSpeed tool, on the contrary to placing the script at
bottom of body, or using defer="true"
or even async="true"
.
Modifier and Type | Field and Description |
---|---|
static String |
COMPONENT_TYPE
The standard component type.
|
COMPONENT_FAMILY
BEANINFO_KEY, bindings, COMPOSITE_COMPONENT_TYPE_KEY, COMPOSITE_FACET_NAME, CURRENT_COMPONENT, CURRENT_COMPOSITE_COMPONENT, FACETS_KEY, VIEW_LOCATION_KEY
Constructor and Description |
---|
DeferredScript()
Construct a new
DeferredScript component whereby the renderer type is set to
DeferredScriptRenderer.RENDERER_TYPE . |
Modifier and Type | Method and Description |
---|---|
void |
processEvent(ComponentSystemEvent event) |
getFamily, getRendersChildren
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, getValueBinding, invokeOnComponent, isRendered, isTransient, markInitialState, processDecodes, processRestoreState, processSaveState, processUpdates, processValidators, queueEvent, removeFacesListener, restoreAttachedState, restoreState, saveAttachedState, saveState, setId, setParent, setRendered, setRendererType, setTransient, setValueBinding
encodeAll, getClientId, getCompositeComponentParent, getContainerClientId, getCurrentComponent, getCurrentCompositeComponent, getListenersForEventClass, getNamingContainer, getResourceBundleMap, getStateHelper, getStateHelper, getValueExpression, initialStateMarked, isCompositeComponent, isInView, isVisitable, popComponentFromEL, pushComponentToEL, setInView, setValueExpression, subscribeToEvent, unsubscribeFromEvent, visitTree
public static final String COMPONENT_TYPE
public DeferredScript()
DeferredScript
component whereby the renderer type is set to
DeferredScriptRenderer.RENDERER_TYPE
.public void processEvent(ComponentSystemEvent event) throws AbortProcessingException
processEvent
in interface ComponentSystemEventListener
processEvent
in class UIComponent
AbortProcessingException