Skip to main content

Visualforce actionPoller Component

About Us
Published by admin
24 March 2016
52

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

We have available resources to start working on your project within 5 business days

1 UX Designer

1 Admin

2 QA engineers

1 Consultant

Related Articles
All articles
Salesforce
IoT
Native IT Service Management solution for Salesforce®
There are numerous ITSM options on the market, the most prominent of which are: Freshservice, ServiceNow, BMC Remedy, SolarWinds Service Desk, and so on. They are all outside of the Salesforce system, necessitate additional user training, and have the potential to complicate the business process. As a result, many Salesforce clients seek native ITSM Salesforce solutions to consolidate all processes on a single platform. This was a project for our group.
20 September 2022
7 reasons Why you should attend Dreamforce 2022
Have you ever wanted to be a part of a big community of like-minded people united by common goals, and values, passionate about learning new things, making friends, sharing experiences and simply having fun? We bet you have. That is what Dreamforce is about! We get that it may not be physically that easy to attend the event but it may be as hard to have enough spare time and motivation to watch it online. Here are 7 reasons why you should become a part of the biggest Salesforce event of the year.
20 September 2022
10 Effective ways to upsell Salesforce® to existing customers
When many companies look to increase their revenue, it's important to work with your most valuable potential market: your current customers. Given that acquiring a new customer costs 5 to 25 times more than retaining a current one, working on upselling and cross-selling is a much more profitable way to grow your business.
01 September 2022