public class ResourceRendererUtilImpl
extends javax.faces.render.RendererWrapper
implements javax.faces.event.ComponentSystemEventListener, javax.faces.component.StateHolder
ResourceVerifier.isDependencySatisfied(FacesContext, UIComponent) to
determine if the resources should be rendered.| Constructor and Description |
|---|
ResourceRendererUtilImpl()
This zero-arg constructor is required by the
StateHolderSaver class during the
RESTORE_VIEW phase of the JSF lifecycle. |
ResourceRendererUtilImpl(javax.faces.render.Renderer wrappedRenderer) |
| Modifier and Type | Method and Description |
|---|---|
void |
encodeBegin(javax.faces.context.FacesContext facesContext,
javax.faces.component.UIComponent uiComponent) |
void |
encodeChildren(javax.faces.context.FacesContext facesContext,
javax.faces.component.UIComponent uiComponent) |
void |
encodeEnd(javax.faces.context.FacesContext facesContext,
javax.faces.component.UIComponent uiComponent) |
javax.faces.render.Renderer |
getWrapped() |
boolean |
isTransient() |
void |
processEvent(javax.faces.event.ComponentSystemEvent event)
Since the Mojarra
com.sun.faces.renderkit.html_basic.ScriptStyleBaseRenderer class implements ComponentSystemEventListener, this class must implement that interface too, since this is a wrapper type of
class. |
void |
restoreState(javax.faces.context.FacesContext facesContext,
Object state) |
Object |
saveState(javax.faces.context.FacesContext facesContext) |
void |
setTransient(boolean transientFlag) |
public ResourceRendererUtilImpl()
StateHolderSaver class during the
RESTORE_VIEW phase of the JSF lifecycle. The reason why this class is involved in restoring state is because the
UIComponent.ComponentSystemEventListenerAdapter implements StateHolder and will attempt to restore the state of any class in the restored view that
implements ComponentSystemEventListener. It does this first by instantiating the class with a zero-arg
constructor, and then calls the restoreState(FacesContext, Object) method.public ResourceRendererUtilImpl(javax.faces.render.Renderer wrappedRenderer)
public void encodeBegin(javax.faces.context.FacesContext facesContext,
javax.faces.component.UIComponent uiComponent)
throws IOException
encodeBegin in class javax.faces.render.RendererWrapperIOExceptionpublic void encodeChildren(javax.faces.context.FacesContext facesContext,
javax.faces.component.UIComponent uiComponent)
throws IOException
encodeChildren in class javax.faces.render.RendererWrapperIOExceptionpublic void encodeEnd(javax.faces.context.FacesContext facesContext,
javax.faces.component.UIComponent uiComponent)
throws IOException
encodeEnd in class javax.faces.render.RendererWrapperIOExceptionpublic javax.faces.render.Renderer getWrapped()
getWrapped in interface javax.faces.FacesWrapper<javax.faces.render.Renderer>getWrapped in class javax.faces.render.RendererWrapperpublic boolean isTransient()
isTransient in interface javax.faces.component.StateHolderpublic void processEvent(javax.faces.event.ComponentSystemEvent event)
throws javax.faces.event.AbortProcessingException
com.sun.faces.renderkit.html_basic.ScriptStyleBaseRenderer class implements ComponentSystemEventListener, this class must implement that interface too, since this is a wrapper type of
class. Mojarra uses this method to intercept PostAddToViewEvent in order to add script and link resources
to the head (if the target attribute has a value of "head").processEvent in interface javax.faces.event.ComponentSystemEventListenerjavax.faces.event.AbortProcessingExceptionpublic void restoreState(javax.faces.context.FacesContext facesContext,
Object state)
restoreState in interface javax.faces.component.StateHolderpublic Object saveState(javax.faces.context.FacesContext facesContext)
saveState in interface javax.faces.component.StateHolderpublic void setTransient(boolean transientFlag)
setTransient in interface javax.faces.component.StateHolderCopyright © 2016 Liferay, Inc.. All rights reserved.