Class WebsocketRenderer
java.lang.Object
jakarta.faces.render.Renderer
com.sun.faces.renderkit.html_basic.HtmlBasicRenderer
com.sun.faces.renderkit.html_basic.WebsocketRenderer
- All Implemented Interfaces:
ComponentSystemEventListener,FacesListener,EventListener
public class WebsocketRenderer extends HtmlBasicRenderer implements ComponentSystemEventListener
WebsocketRenderer is a class that renders the
jsf.push.init() script and decodes any client
behaviors triggered by UIWebsocket.- Since:
- 2.3
- Author:
- Bauke Scholtz
- See Also:
UIWebsocket
-
Nested Class Summary
Nested classes/interfaces inherited from class com.sun.faces.renderkit.html_basic.HtmlBasicRenderer
HtmlBasicRenderer.OptionComponentInfo, HtmlBasicRenderer.Param -
Field Summary
Fields Modifier and Type Field Description static StringRENDERER_TYPEFields inherited from class com.sun.faces.renderkit.html_basic.HtmlBasicRenderer
EMPTY_PARAMS, logger -
Constructor Summary
Constructors Constructor Description WebsocketRenderer() -
Method Summary
Modifier and Type Method Description voiddecode(FacesContext context, UIComponent component)Decode all client behaviors.voidencodeEnd(FacesContext context, UIComponent component)Renderjsf.push.init()function if necessary.voidprocessEvent(ComponentSystemEvent event)After adding component to view, subscribeWebsocketFacesListenerif necessary.Methods inherited from class com.sun.faces.renderkit.html_basic.HtmlBasicRenderer
augmentIdReference, convertClientId, decodeBehaviors, encodeRecursive, getBehaviorParameters, getChildren, getCurrentValue, getEndTextToRender, getFacet, getForComponent, getFormattedValue, getFormattedValue, getMessageIter, getParamList, getPassThruBehaviors, getRendersChildren, getValue, isBehaviorSource, rendererParamsNotNull, setSubmittedValue, shouldDecode, shouldEncode, shouldEncodeChildren, shouldWriteIdAttribute, writeIdAttributeIfNecessaryMethods inherited from class jakarta.faces.render.Renderer
encodeBegin, encodeChildren, getConvertedValue
-
Field Details
-
RENDERER_TYPE
- See Also:
- Constant Field Values
-
-
Constructor Details
-
WebsocketRenderer
public WebsocketRenderer()
-
-
Method Details
-
processEvent
After adding component to view, subscribeWebsocketFacesListenerif necessary.- Specified by:
processEventin interfaceComponentSystemEventListener- Parameters:
event- theComponentSystemEventinstance that is being processed.- Throws:
AbortProcessingException- if lifecycle processing should cease for this request.
-
decode
Decode all client behaviors.- Overrides:
decodein classHtmlBasicRenderer- Parameters:
context-FacesContextfor the request we are processingcomponent-UIComponentto be decoded.
-
encodeEnd
Renderjsf.push.init()function if necessary.- Overrides:
encodeEndin classHtmlBasicRenderer- Parameters:
context-FacesContextfor the response we are creatingcomponent-UIComponentto be rendered- Throws:
IOException- if an input/output error occurs while rendering
-