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





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA