Top Description Fields Constructors Methods
com.sun.faces.renderkit.html_basic

public Class WebsocketRenderer

extends HtmlBasicRenderer
implements ComponentSystemEventListener
Class Inheritance
All Implemented Interfaces
javax.faces.event.ComponentSystemEventListener, javax.faces.event.FacesListener, java.util.EventListener
Annotations
@ListenerFor
systemEventClass:PostAddToViewEvent
Static Imports
com.sun.faces.cdi.CdiUtils.getBeanReference, javax.faces.component.behavior.ClientBehaviorContext.createClientBehaviorContext

WebsocketRenderer is a class that renders the jsf.push.init() script and decodes any client behaviors triggered by UIWebsocket.
Author
Bauke Scholtz
Since
2.3
See Also
UIWebsocket

Field Summary

Modifier and TypeField and Description
public static final String
private static final String
Inherited from com.sun.faces.renderkit.html_basic.HtmlBasicRenderer:
EMPTY_PARAMSlogger

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
decode(FacesContext
FacesContext for the request we are processing
context
,
UIComponent
UIComponent to be decoded.
component
)

Overrides com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.decode.

Decode all client behaviors.
public void
encodeEnd(FacesContext
FacesContext for the response we are creating
context
,
UIComponent
UIComponent to be rendered
component
)

Overrides com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeEnd.

Render jsf.push.init() function if necessary.
private static String
getBehaviorScripts(FacesContext context, UIWebsocket websocket)

Helper to collect all client behavior scripts of websocket into a string representing a JS object.

public void
processEvent(ComponentSystemEvent
the ComponentSystemEvent instance that is being processed.
event
)

Implements javax.faces.event.ComponentSystemEventListener.processEvent.

After adding component to view, subscribe WebsocketFacesListener if necessary.
Inherited from com.sun.faces.renderkit.html_basic.HtmlBasicRenderer:
augmentIdReferenceconvertClientIddecodeBehaviorsencodeRecursivegetBehaviorParametersgetChildrengetCurrentValuegetEndTextToRendergetFacetgetForComponentgetFormattedValuegetFormattedValuegetMessageItergetParamListgetPassThruBehaviorsgetRendersChildrengetValueisBehaviorSourcerendererParamsNotNullsetSubmittedValueshouldDecodeshouldEncodeshouldEncodeChildrenshouldWriteIdAttributewriteIdAttributeIfNecessary

Field Detail

RENDERER_TYPEback to summary
public static final String RENDERER_TYPE
SCRIPT_INITback to summary
private static final String SCRIPT_INIT

Constructor Detail

WebsocketRendererback to summary
public WebsocketRenderer()

Method Detail

decodeback to summary
public void decode(FacesContext context, UIComponent component)

Overrides com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.decode.

Decode all client behaviors.

Parameters
context:FacesContext

Doc from javax.faces.render.Renderer.decode.

FacesContext for the request we are processing

component:UIComponent

Doc from javax.faces.render.Renderer.decode.

UIComponent to be decoded.

Annotations
@Override
encodeEndback to summary
public void encodeEnd(FacesContext context, UIComponent component) throws IOException

Overrides com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeEnd.

Render jsf.push.init() function if necessary.

Parameters
context:FacesContext

Doc from javax.faces.render.Renderer.encodeEnd.

FacesContext for the response we are creating

component:UIComponent

Doc from javax.faces.render.Renderer.encodeEnd.

UIComponent to be rendered

Annotations
@Override
Exceptions
IOException:

Doc from javax.faces.render.Renderer.encodeEnd.

if an input/output error occurs while rendering

getBehaviorScriptsback to summary
private static String getBehaviorScripts(FacesContext context, UIWebsocket websocket)

Helper to collect all client behavior scripts of websocket into a string representing a JS object.

processEventback to summary
public void processEvent(ComponentSystemEvent event) throws AbortProcessingException

Implements javax.faces.event.ComponentSystemEventListener.processEvent.

After adding component to view, subscribe WebsocketFacesListener if necessary.

Parameters
event:ComponentSystemEvent

Doc from javax.faces.event.ComponentSystemEventListener.processEvent.

the ComponentSystemEvent instance that is being processed.

Annotations
@Override
Exceptions
AbortProcessingException:

Doc from javax.faces.event.ComponentSystemEventListener.processEvent.

if lifecycle processing should cease for this request.