function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
AffinaquestAffinaquest 

Partial Page Refresh from Controller

I am interested in periodically updating a portion of a visualforce page (contained within an output panel) directly from a controller extension.

 

The application needs to load a fair amount of data and what I would like to do is to periodically refresh the output panel with the data that has been loaded up to that point.

 

Is there a way to force a portion of the visualforce page to refresh from code in the controller extension.

 

Thanks for your help,

JR

 

bob_buzzardbob_buzzard

Not from the controller - by the time the page has been sent back to the browser, you have no further control over what happens.  You will need to implement this client side. 

 

There is a setTimeout() JavaScript function that can be used to execute some JavaScript code a number of milliseconds in the future.  

 

Use a VF actionFunction to create a JavaScript function that executes a method in your controller (to regenerate the data) and set the reRender attribute on the actionFunction to just change the appropriate section of the page.