Javatpoint Logo
Javatpoint Logo

PrimeFaces Ajax Poll

PrimeFaces provides <p:poll> component which is used to makes ajax calls periodically. It provides an option interval which is used to specify time.

The following example explains the usage of this component. This example contains the following files.

JSF File

// ajax-poll.xhtml

ManagedBean

// AjaxCounter.java

Output:

This page updates each time on the basis of specified time. Initially, it is set to 0.

PrimeFaces Poll 1

Page after update.

PrimeFaces Poll 2




Please Share

facebook twitter google plus pinterest

Learn Latest Tutorials


Preparation


B.Tech / MCA