Download USER'S GUIDE 3.3

Transcript
PrimeFaces Userʼs Guide
3.78 Push
Push component is an agent that creates a channel between the server and the client.
Info
Tag
push
Component Class
org.primefaces.component.push.Push
Component Type
org.primefaces.component.Push
Component Family
org.primefaces.component
Renderer Type
org.primefaces.component.PushRenderer
Renderer Class
org.primefaces.component.push.PushRenderer
Attributes
Name
Default
Type
Description
id
null
String
Unique identifier of the component
rendered
TRUE
Boolean
Boolean value to specify the rendering of the component, when
set to false component will not be rendered.
binding
null
Object
An el expression that maps to a server side UIComponent
instance in a backing bean
channel
null
Object
Unique channel name of the connection between subscriber and
the server.
onmessage
null
String
Client side callback to execute when data is pushed.
onclose
null
String
Client side callback to execute when connection is closed.
autoConnect
TRUE
Boolean
Connects to channel on page load when enabled.
Getting Started with the Push
See chapter 6, "PrimeFaces Push" for detailed information.
Client Side API of PrimeFaces.widget.PrimeWebSocket
Method
Description
void send(data)
Sends data in json format to push server.
void connect()
Connects to the channel.
void close()
Disconnects from channel.
319