+ Start a Discussion
virenviren 

Add custom controller extension with custom controller in VF page

 Hi,

 

How to add custom controller extension with custom controller in VF page?

Example:
<apex:page controller="CustCtrl" extension="CustExt">

 

Is it possible (shown above)?

Best Answer chosen by Admin (Salesforce Developers) 
bob_buzzardbob_buzzard

That's exactly how you would do it.  Then your extension needs the appropriate constructor:

 

public class CustExt
{
  public CustExt(CustCtrl superCtrl)
  {
// save the superCtrl or whatever! } }

 

All Answers

bob_buzzardbob_buzzard

That's exactly how you would do it.  Then your extension needs the appropriate constructor:

 

public class CustExt
{
  public CustExt(CustCtrl superCtrl)
  {
// save the superCtrl or whatever! } }

 

This was selected as the best answer
virenviren

Thanks bob_buzzard,

 

resolved issue.