function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
SS KarthickSS Karthick 

What is the need of Custom(Custom controller ext) Extension

Hi folks,
         Can anyone tell me what is the need of custom extention in visualforce page?
Becase everything we can  done by using custom controller .


Thanks in advance
Karthick
Best Answer chosen by SS Karthick
Shashikant SharmaShashikant Sharma
Extensions are used mainy in two scenarios 

1. When your page has a Standard Controler : This is the most when you use extension class to develop custom logic as with standard controller you can not use Controller

2. When you have  controller class : In such scenario mostly you do not need as you can write custom code in your controller class. But sometimes due to design perspective and to keep modularity etc we do use extensions classes.

 

All Answers

Shashikant SharmaShashikant Sharma
Extensions are used mainy in two scenarios 

1. When your page has a Standard Controler : This is the most when you use extension class to develop custom logic as with standard controller you can not use Controller

2. When you have  controller class : In such scenario mostly you do not need as you can write custom code in your controller class. But sometimes due to design perspective and to keep modularity etc we do use extensions classes.

 
This was selected as the best answer
SS KarthickSS Karthick
@Shashikant Sharma,
          Can you give me the example for custom extension

Thanks in advance
Karthick
Shashikant SharmaShashikant Sharma
See this : http://www.salesforce.com/us/developer/docs/pages/Content/pages_controller_extension.htm

Please mark this post as solved so that it benifit others.