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
    Commented Apr 29, 2013 at 22:33

1 Answer 1

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.

0

You must log in to answer this question.

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