8

Hello guys,

I am trying to refresh only one component on the visualforce page after certain intervals. Below is something what I have:

<apex:actionPoller action="{!TestCall}" reRender="Test" interval="10"/>
<apex:repeat var="feed" value="{!GNationLivePosts}" id="Test">  
    <table>  
      <tr>  
        <td>
        </td>
      </tr>
    </table>
</apex:repeat>

   //ActionPoller's Method
   public pageReference TestCall(){
     getGNationLivePosts();
     return null;
   }

According to me: This should keep calling the getGNationLivePosts method every 10 seconds and reRender the <apex:repeat>but its not happening.

Could someone help me realize what exactly I am doing wrong, and how could I fix it?

Thanks,

Much appreciated!

1
  • 2
    How do you know it's not working? From your stub code, nothing appears to be happening. Perhaps you could post more code to indicate what your TestCall() method actually does
    – greenstork
    Apr 29 '13 at 22:33
13

Instead of rerendering your repeat, you should wrap the repeat in am outputpanel and rerender that. Assuming your method call is doing a query to retrieve the data rendered in the repeat, it should refresh.

1
  • @Prady I did accept it.
    – subodhbahl
    Apr 30 '13 at 13:50

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.