10 votes
Accepted

How To Stop actionPoller After Set Duration?

You can tweak the example from the docs just slightly to check an isEnabled property. Controller public with sharing class Demo { final Long start = Datetime.now().getTime(); public Boolean ...
Adrian Larson's user avatar
  • 150k
5 votes
Accepted

in apex:repeat, getter called twice in actionpoller rerender

Getters and setters may be called more than once. This is determined by the compiler and can't explicitly be forced. Generally, if you're doing anything in a getter, you should be caching the results, ...
sfdcfox's user avatar
  • 487k
5 votes

How to call an apex class and visualforce after every 5 seconds to display updated data

Polling every 5 seconds is bad imo and waste of resources. Polling generally slows things down as well. From what I can see if all you want is a notification for newly created, deleted case. Once you ...
Pranay Jaiswal's user avatar
4 votes
Accepted

Emoji Support in Visualforce

I solved this problem by using urlencoding. Below is a working example. What I do here is, first I encoded the Case Subject in Condroller using EncodingUtil.URLENCODE then again decode the value in VF ...
Saroj Bera's user avatar
  • 14.7k
2 votes
Accepted

Display time remaining before apex:actionPoller refresh

Its possible but not easy though, Used some JavaScript code from here. Oncomplete of action poller, can write a function which resets the counter. Class: public class ActionPollarRemainingTime { ...
Raul's user avatar
  • 18.7k
2 votes

Is there any component equivalent in LWC or AURA for apex:actionPoller?

The equivalent would be lightning:empApi/lightning-emp-api. Instead of asking for updates, it's much easier to listen for updates. If you need a polling mechanism, use setInterval/setTimeout. However, ...
sfdcfox's user avatar
  • 487k
2 votes
Accepted

How to call an apex class and visualforce after every 5 seconds to display updated data

Is there a better way to implement polling in my case, instead of using count variable, since it has no purpose in my usecase? You don't need the counter. You don't even need an action. Your poller ...
sfdcfox's user avatar
  • 487k
1 vote

Executing a batch class based on the class name or id entered in as a string or id

Here is how you create an instance of a class using Reflection pattern. public Object createInstance(String clz) { Type typ = Type.forName(clz); Object instance = null; if (typ != null) { ...
metasync's user avatar
  • 1,772
1 vote

in apex:repeat, getter called twice in actionpoller rerender

I think you are using the actionpoller to get the latest data on the page after each interval. I would suggest you to use Streaming API as its a simple way to push relevant data to your users in ...
Naval Sharma's user avatar
  • 1,677
1 vote
Accepted

actionpoller to update number on vfpage

Update your div line with <apex:outputpanel id="notification">{!taskSize}</apex:outputpanel>
Himanshu's user avatar
  • 10.5k

Only top scored, non community-wiki answers of a minimum length are eligible