1

I have an actionPoller visualforce component rerendering an output panel every 5 seconds. This works fine, however when I switch to another outputPanel 5 seconds later the action poller will rerender the first panel and place it above the second panel.

How can I use Javascript / jQuery to enable / disable whether the actionPoller is enabled?

2
  • 1
    I recommend you control the enabled attribute on your <apex:actionPoller> tag with a property on your controller. When you switch tabs, simply set the property to false.
    – Adrian Larson
    Commented Oct 18, 2016 at 14:09
  • Thank you Adrian. I took this approach and it worked fine.
    – user24634
    Commented Oct 21, 2016 at 10:51

1 Answer 1

0

I recommend you control the enabled attribute on your <apex:actionPoller> tag with a Boolean property on your controller. When you switch tabs, simply set the property to false. Something like:

public Boolean shouldPoll { get; set; }
<apex:actionPoller enabled="{!shouldPoll}" ...>
0

You must log in to answer this question.