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
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(javax.faces.event.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(javax.faces.event.ComponentSystemEvent event) throws javax.faces.event.AbortProcessingException
processEvent
in interface javax.faces.event.ComponentSystemEventListener
processEvent
in class javax.faces.component.UIComponent
javax.faces.event.AbortProcessingException
Copyright © 2012–2014 OmniFaces. All rights reserved.