How to Re-render a part of VisualForce Page

by - 4:48 PM

How to re-render pageblock / section of a page ?

Quite often developers come across this scenario where a portion of page needs to re-rendered based on selection made on one of the fields present on page.Here is scenario where I am asked to show the a text box based on selection made on picklist presented on Opportunity

You can simply re-render a pageblock, based on action made on some other field of the page, using the attribute reRender="name of block to be rendered"  and rendered="xyz condition"
 for example --> rendered="{!Opportunity.StageName=='Prospecting'}"  


Create an new visual-force page in your organization and copy and run the code to see in action



Sample Code : Create visual force page



You May Also Like

0 comments