Skip to main content

Visualforce actionPoller Component

About Us
Published by admin
24 March 2016

A timer that sends an AJAX request to the server according to the time interval that you specify. Each request can result in a full or partial page update. This component is an alternative to using setInterval (js).

In attribute action some controller method should be put. For this you must use standard syntax, for example, action="{!someAction}". If an action is not specified, the page simply refreshes.

Attributes enabled and rendered have the same function. With the help of them you can turn your actionPoller on or off.

Id is an identifier that allows the component to be referenced by other components in the page.

Attribute interval sets the time interval between AJAX update requests, in seconds. This value must be 5 seconds or greater, and if not specified, it defaults to 60 seconds. Note that the interval is only the amount of time between update requests. Once an update request is sent to the server, it enters a queue and can take additional time to process and display on the client.

Into attribute oncomplete you can put the JavaScript, which will be invoked when the result of an AJAX update request completes on the client.

Into attribute onsubmit you can put the JavaScript, which will be invoked before an AJAX update request has been sent to the server.

In attribute reRender you can put Id of one or more components that will be redrawn, when the result of an AJAX update request returns to the client. This value can be a single ID, a comma-separated list of IDs, or a merge field expression for a list or collection of IDs.

In attribute status you can put Id of an associated component that displays the status of an AJAX update request.

You can use attribute timeout, if you need your request to last no more time than it is required. Value of this attribute should be entered in milliseconds.

It is a good practice to make action methods used by <apex:actionPoller> lightweight, to avoid performing DML and to avoid using this component with enhanced lists. <apex:actionPoller> refreshes the connection regularly, keeping login sessions alive. A page with <apex:actionPoller> on it won't time out due to inactivity.

Visualforce actionPoller Component

Question to the expert
Related Articles
All articles
Save the dates! Upcoming Salesforce events are here!
Training is an essential part of the person’s growth as a professional. Especially it’s important to learn something new for developers on an ongoing basis because they are the ones who meet unique business issues and create the best solutions that bring to life any client's wishes. Salesforce has always tried to provide all the partners with opportunities to learn and develop. We present you a useful list of upcoming events from Salesforce that can be an interesting and valuable pastime.
08 April 2021
Augmented Reality for Business. FieldXR Project part 3
In the previous articles, the JET BI project, Structure Sensor SDK, and the problem of identifying the scanned object were described. Also, we considered the calculating algorithm of the found 3D model position for displaying in the scanned object coordinates. Today we perform the process of developing the JET BI FieldXR project.
29 March 2021
How to work with the identified 3D objects. FieldXR project part 2
This post is the second article in the series that covers FieldXR app, an extension for Salesforce Field Service with deep visualization functionality.  We have already raised the issue of collecting 3D information about the real world required for the app’s correct operation. In this article, we will highlight the next two pain points: identifying the scanned object and calculating the position of the found 3D model for displaying in the scanned object’s coordinates.
25 March 2021