Activity Forums Salesforce® Discussions Is there any expression to bind in Salesforce controllers?

  • Avnish Yadav

    Member
    August 23, 2018 at 6:33 am

    Hi Madhulika,

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

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

    Thanks.

  • shariq

    Member
    September 17, 2018 at 10:14 pm

    Hi,

    I think you want to bind controller to vf page-

    try getter setter variables and make sure to extend the controller in vf page -

    <apex:page controller = "TestController">

    OR

    Dynamic Visualforce Bindings
    Dynamic Visualforce bindings are a way of writing generic Visualforce pages that display information about records without necessarily knowing which fields to show. In other words, fields on the page are determined at run time, rather than compile time. This allows a developer to design a single page that renders differently for various audiences, based on their permissions or preferences. Dynamic bindings are useful for Visualforce pages included in managed packages since they allow for the presentation of data specific to each subscriber with very little coding.

    Dynamic Visualforce binding is supported for standard and custom objects. Dynamic bindings take the following general form:

    reference[expression]

    where reference evaluates to either an sObject, an Apex class, or a global variable
    expression evaluates to a string that is the name of a field, or a related object. If a related object is returned, it can be used to recursively select fields or further related objects.

    Hope this helps.

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos