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
Cindy NormanCindy Norman 

What is scope of rerender?

I have 3 tabs on my page. When i say "Edit" on one tab (using apex:commandLink), i want to render the details of a record on another tab.
But I'm having trouble getting the other tab's pageblocksections to rerender.
Does the rerender have a scope criteria?


Thanks!
Best Answer chosen by Cindy Norman
Himanshu ParasharHimanshu Parashar
Hi Cindy,

There is no scope of rerender it only depends on the id of the item. rerender directly doesn't work with pageblocksection so you need to put that pageblocksection in any outputpanel and then pass id of that outputpanel in rerender attribute. so for example
 
<apex:pageblocksection id="pgblk">
//your code here


</apex:pageblocksection>


<apex:actionfunction id="actfunction" rerender="pgblk,panelblk"/>


//this will work
<apex:outputpanel id="panelblk">
<apex:pageblocksection id="pgblk"> //your code here 
</apex:pageblocksection>
</apex:outputpanel>



can you please post your code as well so that we can see if there is any other issue.


Thanks,
Himanshu
Salesforce Certified Developer | Administrator | Service Cloud Consultant

P.S. If my answer helps you to solve your problem please mark it as best answer. It will help other to find best answer.

All Answers

Himanshu ParasharHimanshu Parashar
Hi Cindy,

There is no scope of rerender it only depends on the id of the item. rerender directly doesn't work with pageblocksection so you need to put that pageblocksection in any outputpanel and then pass id of that outputpanel in rerender attribute. so for example
 
<apex:pageblocksection id="pgblk">
//your code here


</apex:pageblocksection>


<apex:actionfunction id="actfunction" rerender="pgblk,panelblk"/>


//this will work
<apex:outputpanel id="panelblk">
<apex:pageblocksection id="pgblk"> //your code here 
</apex:pageblocksection>
</apex:outputpanel>



can you please post your code as well so that we can see if there is any other issue.


Thanks,
Himanshu
Salesforce Certified Developer | Administrator | Service Cloud Consultant

P.S. If my answer helps you to solve your problem please mark it as best answer. It will help other to find best answer.
This was selected as the best answer
sandeep sankhlasandeep sankhla
Hi Cindy,

please refer below link for more details..

https://developer.salesforce.com/forums/ForumsMain?id=906F0000000AgMGIA0

P.S. If my answer helps you to solve your problem please mark it as best answer. It will help other to find best answer.

Thanks,
Sandeep
Salesforce Certified Developer