0

I want to refresh pageblock table after every 20 seconds, but it is not working. Can anyone suggest how should I use actionpoller tag in below code

VF Page:

<apex:page standardController="Case" recordSetVar="Cases" extensions="CasePagination">
<apex:form >
    <apex:actionPoller reRender="ncase,ocase" interval="20"/>
    <apex:panelGrid columns="2" cellspacing="20" width="100%">
        <apex:pageBlock title="New Cases">
            <apex:pageBlockTable value="{!Newcases}" var="c" id="ncase">

                <apex:column >
                    <apex:outputLink value="/{!c.id}" target="_top">{!c.CaseNumber}</apex:outputLink>
                </apex:column>
                <apex:column value="{!c.Status}" headerValue="Status"></apex:column>
                <apex:column value="{!c.owner.Name}" headerValue="Case Owner"></apex:column>
                <apex:column value="{!c.CreatedDate}" headerValue="Created Date"></apex:column>
            </apex:pageBlockTable>
            <apex:panelGrid columns="2">
                <apex:commandLink action="{!previous}">Previous</apex:commandlink>
                <apex:commandLink action="{!next}">Next</apex:commandlink>
            </apex:panelGrid>
        </apex:pageBlock>
        <apex:pageBlock title="Open Cases">
            <apex:pageBlockTable value="{!OpenCases}" var="c" id="ocase">

                <apex:column >
                    <apex:outputLink value="/{!c.id}" target="_top">{!c.CaseNumber}</apex:outputLink>
                </apex:column>
                <apex:column value="{!c.Status}" headerValue="Status"></apex:column>
                <apex:column value="{!c.owner.Name}" headerValue="Case Owner"></apex:column>
                <apex:column value="{!c.CreatedDate}" headerValue="Created Date"></apex:column>
            </apex:pageBlockTable>
            <apex:panelGrid columns="2">
                <apex:commandLink action="{!previous}">Previous</apex:commandlink>
                <apex:commandLink action="{!next}">Next</apex:commandlink>
            </apex:panelGrid>
        </apex:pageBlock>
    </apex:panelGrid>
</apex:form>

5
  • pageblocktable refresh sometimes doen't work so try to put your pageblocktable inside apex:outputpanel and define id of outputpanel and update your actionpoller rerender attribute with outputpanel id
    – Himanshu
    Oct 23, 2015 at 11:28
  • <apex:form > <apex:actionPoller reRender="ncase" interval="15"/> <apex:outputPanel id="ncase"> <apex:panelGrid > <apex:pageBlock title="New Cases">
    – C0DEPirate
    Oct 23, 2015 at 11:45
  • is it not working?
    – Himanshu
    Oct 23, 2015 at 11:47
  • will check and update you
    – C0DEPirate
    Oct 23, 2015 at 12:52
  • No its not working, As a workaround I had to add script to reload page
    – C0DEPirate
    Oct 23, 2015 at 13:06

1 Answer 1

3

Give it inside:

<apex:pageBlock title="New Cases">
<apex:actionPoller rerender="ncase" interval="15"/> 
</apex:pageBlock> 

This site is temporarily in read-only mode and not accepting new answers.

Not the answer you're looking for? Browse other questions tagged .