Registers a websocket push
connection in client side by rendering the necessary scripts.
Push messages can be sent from server side via
jakarta.faces.push.PushContext
interface. See also
jakarta.faces.push.Push
API documentation for an
elaborate instruction on how to use
<f:websocket>
.
Info | Value |
---|---|
Component Type | jakarta.faces.Websocket |
Handler Class | None |
Renderer Type | None |
Description | None |
Name | Required | Type | Description |
---|---|---|---|
binding | false | jakarta.el.ValueExpression
(must evaluate to jakarta.faces.component.UIComponent )
|
Value binding expression to a backing bean property bound to the component instance for the |
id | false | jakarta.el.ValueExpression
(must evaluate to java.lang.String )
|
Component identifier of the |
channel | true | jakarta.el.ValueExpression
(must evaluate to java.lang.String )
|
The name of the websocket channel. It may not be an EL expression and it may only contain alphanumeric characters, hyphens, underscores and periods. All open websockets on the same channel name will receive the same push notification from the server. |
scope | false | jakarta.el.ValueExpression
(must evaluate to java.lang.String )
|
The scope of the websocket channel.
It may not be an EL expression and allowed values are |
user | false | jakarta.el.ValueExpression
(must evaluate to java.io.Serializable )
|
The user identifier of the websocket channel, so that user-targeted push messages can be sent.
It must implement |
onopen | false | jakarta.el.ValueExpression
(must evaluate to java.lang.String )
|
The JavaScript event handler function that is invoked when the websocket is opened. The function will be invoked with one argument: the channel name. |
onmessage | false | jakarta.el.ValueExpression
(must evaluate to java.lang.String )
|
The JavaScript event handler function that is invoked when a push message is received from the server.
The function will be invoked with three arguments: the push message, the channel name and the raw |
onerror | false | jakarta.el.ValueExpression
(must evaluate to java.lang.String )
|
The JavaScript event handler function that is invoked when a connection error has occurred and the websocket will attempt to reconnect.
The function will be invoked with three arguments: the error reason code, the channel name and the raw |
onclose | false | jakarta.el.ValueExpression
(must evaluate to java.lang.String )
|
The JavaScript event handler function that is invoked when the websocket is closed and will not anymore attempt to reconnect.
The function will be invoked with three arguments: the close reason code, the channel name and the raw |
connected | false | jakarta.el.ValueExpression
(must evaluate to java.lang.Boolean )
|
Whether to (auto)connect the websocket or not.
Defaults to |
rendered | false | jakarta.el.ValueExpression
(must evaluate to java.lang.Boolean )
|
Whether to render the websocket scripts or not.
Defaults to |