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 thefaces.push.init()script and decodes any client behaviors triggered byUIWebsocket.- 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_TYPE-
Fields inherited from class com.sun.faces.renderkit.html_basic.HtmlBasicRenderer
EMPTY_PARAMS, logger
-
Fields inherited from class jakarta.faces.render.Renderer
PASSTHROUGH_RENDERER_LOCALNAME_KEY
-
-
Constructor Summary
Constructors Constructor Description WebsocketRenderer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddecode(FacesContext context, UIComponent component)Decode all client behaviors.voidencodeEnd(FacesContext context, UIComponent component)Renderfaces.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, writeIdAttributeIfNecessary
-
Methods inherited from class jakarta.faces.render.Renderer
encodeBegin, encodeChildren, getConvertedValue
-
-
-
-
Field Detail
-
RENDERER_TYPE
public static final String RENDERER_TYPE
- See Also:
- Constant Field Values
-
-
Method Detail
-
processEvent
public void processEvent(ComponentSystemEvent event) throws AbortProcessingException
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
public void decode(FacesContext context, UIComponent component)
Decode all client behaviors.- Overrides:
decodein classHtmlBasicRenderer- Parameters:
context-FacesContextfor the request we are processingcomponent-UIComponentto be decoded.
-
encodeEnd
public void encodeEnd(FacesContext context, UIComponent component) throws IOException
Renderfaces.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
-
-