+ Start a Discussion
AnupamaAnupama 

Can we refer to 2 standard controllers in a single VF page?

Can we refer to 2 standard controllers in a single VF page?
Best Answer chosen by Admin (Salesforce Developers) 
hisrinuhisrinu
You can't use multiple standardcontrollers but you can use multiple extensions.

All Answers

hisrinuhisrinu
You can't use multiple standardcontrollers but you can use multiple extensions.
This was selected as the best answer
gv007gv007

senu

       Do u have the first line of apex:page code for that?

hisrinuhisrinu

<apex:page standardcontroller="Account" extensions="extension1,extension2,...">

</apex:page>

UmapenUmapen

I do not have standard controller.

My first line looks like this. I tried using ;

 

 

<apex:page title="CreateFlyer" controller="Controller1,SelectQ" showheader="false" sidebar="false">

I am getting error

Error: The name 'Controller1,SelectQ' can only contain alphanumeric characters, must begin with a letter, and must be unique. 

 

Any suggestions?

gv007gv007

<apex:page title="CreateFlyer" controller="Controller1" extensions="SelectQ" showheader="false" sidebar="false"> </apex:page>

Controller1

 

public with sharing class Controller1 {}

 

 

 

 

Controller

public class SelectQ { public SelectQ(Controller1 controller) { }}

 

 

Please create controller1,and 2 create page.I suggest please go through intilal cook book examples.available in the documentation.

gv007gv007
you can also do like this ,declare one controller as abstract class and extends it.what is yours situation.