I have an iframe on a pages with standard controller. I need to refresh this iframe, say, once in 10 seconds. For some reason apex:actionPoller ignores specified interval in seconds and performs requests once in 60 seconds (default interval). I use the following code:

    <apex:actionPoller action='{!refresh}' rerender='relevant_content' interval="{!IF(($Setup.AppConfig__c != NULL && $Setup.AppConfig__c.RefreshInterval__c != NULL), $Setup.AppConfig__c.RefreshInterval__c, 20)}"/>
    <apex:outputPanel id='relevant_content'>
        <apex:iframe src="{!LinkToRelevantContent}" scrolling="true" height="400px" />

Did anybody encountered this problem?

  • What's the value of the App Config Refresh Interval org wide setting? – Matt and Neil Aug 16 '15 at 17:14

I think the value may be getting lost in the zealous null checking. Try this:

interval="{!BLANKVALUE($Setup.AppConfig__c.RefreshInterval__c, 20)}"

Consider that if 99.99% of the audience uses a 20 second value, you could eliminate the levers and dials altogether in the interest of keeping the code itself simpler. As developer you have the right :-)

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.