Activity Forums Salesforce® Discussions How Many Controllers Can Be Used On Single Vf Page?

  • shariq

    Member
    September 20, 2018 at 3:03 pm

    Hi,

    Only one controller can be used salesforce. Other than them, Controller extension can be used.

    There may be more than one Controller extension.

    Example:

    <apex:page standardController="Account"

    extensions="ExtOne,ExtTwo" showHeader="false">

    <apex:outputText value="{!foo}" />

    </apex:page>

    if ExtOne and ExtTwo, both have the method getFoo() then the method of ExtOne will be executed.

    A controller extension is any Apex class that contains a constructor that takes a single argument of typeApexPages.StandardController or CustomControllerName, where CustomControllerName is the name of a custom controller that you want to extend.

    Thanks

    • This reply was modified 5 years, 7 months ago by  shariq.
  • Parul

    Member
    September 20, 2018 at 5:30 pm

    We can use only one controller can be used salesforce. Other than them, Controller extension can be used. There may be more than one Controller extention.

     

    Thanks

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos