The <a4j:push> periodically perform AJAX request to server, to simulate 'push' data.

The main difference between <a4j:push> and <a4j:poll> components is that <a4j:push> makes request to minimal code only (not to JSF tree) in order to check the presence of messages in the queue. If the message exists the complete request will be performed. The component doesn't poll registered beans but registers EventListener which receives messages about events.

Attribute 'interval' is used as for poll component. It specifies the interval in ms. for call push request. Simple example of usage:

Page code:

Code for registration of listener:

Component can get message using current code:

Thus, component 'push' uses asynchronous model instead of polls.

There is simple Push example using Runabble interface.

When you hit Start button new Thread will be started and alive for a minute. It will generate random Uuid once in a ten seconds.

Push component will fire the request after uuid generation event sent and update the output field displaying new uuid value.

Push Demo