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
SureshSuresh 

Rendered and rerender

Hi,

Can i know how does Render and rerendered  support in VF pages

Regards,
Suresh.
ManojjenaManojjena
Hi Suresh ,

Rendered is to display one component or a group of components with condition from DOM .
Rerender is something to refresh some component  with some action .
You can add more then one component Id to refresh on Rerender .

Please let me know any issue ,If it helps you understand the concepts select beat answer to help others.
sandeep sankhlasandeep sankhla
Hi Suresh,

Rendered - It is same as you are displaying a block based on some condition...if that condition will become true then only that block will be visible .
example:

<apex:outputpanel  rendered ="{If(lstAcc.size >0 , true, false)}">
        
</apex:outputpanel>

Rerender - It means a particular block or section you are refershing....

example:

You have one block where you are showing the contacts related to account and then onclick of add button you have added one more contact to account...so instead of refershing and reloading the entire page, you can simply refersh the section which shows the contact related to account..

<apex:outputpanel  id="dummyId">
        
</apex:outputpanel>

<apex:commandbutton onclick="someaction"     action="{!method}"  rerender="dummyId" />

In above example on clik of button we are refershing the panel which has id as dummyId..

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