Activity Forums Salesforce® Discussions What are expressions used in pages to bind in controllers?

  • Avnish Yadav

    Member
    September 14, 2018 at 1:18 pm

    Hello Anjali,

    Using methods we can bind.
    Getter: Will return value from controller to Visualforce page
    Setter: Will pass value from Visualforce page to the controller
    Action: Will redirect to another page.

    Hope this will help you.

    Thanks.

  • Parul

    Member
    September 14, 2018 at 1:31 pm

    Hi

    With the help of methods, we can bind in controllers inside VisualForce pages.

    Values are returned by ‘Getter’ to VisualForce Page from the controller.
    Values are passed by ‘Setter’ from VisualForce page to controller.
    Redirect to another page with ‘action’.

     

    thanks.

  • shariq

    Member
    September 14, 2018 at 9:53 pm

    Hi,

    There are two ways -

    1. Using Getter Setter Variables.
    2. Using 'get'+method name or 'set'+method name

    Example -

    public String str{get;set;}//Use {!str }in vf page

    public String getAllValues(){

    //return string

    return str2;

    }//Use {!AllValues}

    Hope this helps.

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos