• #67003
    Salesforce | Deepak Deepak #4
    Forcetalks

    How many custom controllers can we have per Visualforce page in Salesforce?

    How many custom controllers can we have per VisualForce page?

     

    • This topic was modified 1 month ago by Salesforce | Deepak Deepak.
    • This topic was modified 3 weeks, 4 days ago by Salesforce | Team Team.
    • This topic was modified 3 weeks, 4 days ago by Salesforce | Team Team.
    #67008
    Salesforce | Manish Manish #18
    Forcetalks

    Hi Deepak,

    We have three types of controllers that we use on Visualforce Page,

    1. Standard Controller : Standard controllers will have same logic and functionality used standard visualforce pages. No Apex code is required in Standard Controllers

    Syntax: <apex:page standardController=”Account”>

    2. Custom Controller : When a developer needs different logic and functionality he/she may write their own Apex controller class. Custom controller’s will not provide default functions like standard controllers.

    Syntax : <apex:page controller=”ClassName”>

    3. Extensions : If we want to use both custom controller functionality and standard controller functionality we use extension controllers. Extension Controllers begins with Standard controller and extended or overridden with custom controller with custom apex code.

    Syntax: <apex:page standardController=”Äccount” extensions=”ClassName, ClassName2″>

    #67045
    Salesforce | Shweta Shweta #5
    Forcetalks

    We can have only one controller at a time either it may be Standard Controller or Custom Controller and multiple controller extensions. There is no limit on the number of extensions you can have on a VisualForce.

     

Viewing 3 posts - 1 through 3 (of 3 total)

Please to reply to this topic.

CONTACT US

We're not around right now. But you can send us an email and we'll get back to you, asap.

Sending

About Us

Forcetalks is a Salesforce collaboration platform for coders & developers, geeks & nerds, consultants & business heads, admins & architects, managers & marketers and of course the business owners. A community where you can learn from, where you can contribute to. For you. For Salesforce. Read More...

Copyright 2020 Forcetalks. All Right Reserved.

Log in with your credentials

or    

Forgot your details?