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?

  • 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 Oct 18 '16 at 14:09
  • Thank you Adrian. I took this approach and it worked fine. – user24634 Oct 21 '16 at 10:51
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}" ...>
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy