Activity Forums Salesforce® Discussions What are Render and Rerender in Salesforce Visualforce page ?

  • Manish

    Member
    January 23, 2020 at 7:57 am

    Hi Arun

     

    Render:Render is used to hide or display a visualforce component.

    <apex:page controller="RenderedControllr">
    <apex:form >
    <apex:pageBlock >
    <apex:commandButton value="Show Bottom Page Block" action="{!ShowBlockMethod}"/>
    </apex:pageBlock>
    <apex:pageBlock rendered="{!flag}">
    Account Name  :<apex:outputField value="{!filedName}"/>
    <br/>
    Account Number :<apex:outputField value="{!fieldNAme}"/>
    </apex:pageBlock>
    </apex:form>

    </apex:page>

    reRendered:It is used to refresh perticular section of vf page.

    <apex:page controller="ControllerName">

    <apex:form >
    <apex:pageBlock >
    <apex:commandButton value="Refresh Section" action="{!method}" rerender="one"/>
    </apex:pageBlock>

    <apex:pageBlock id="one">
    <b>  Output Text   : </b>   <apex:outputText value="{!fieldname}"/>
    </apex:pageBlock>
    </apex:form>

    </apex:page>

     

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos