+ Start a Discussion
Gabriel Corrêa de OliveiraGabriel Corrêa de Oliveira 

Standard controller extension with configurable Visualforce page?

Dear All,

I am new to Force.com, and I need to understand clearly whether the following requirements are attainable.

I have been checking some Books on Force.com development, and I found the following:
Development with the Force.com Platform, 3rd edition, by Jason Ouellete, Page 197
[..]A controller extension is a custom controller that extends the behavior of a standard controller. Controller extensions are primarily used to integrate Visualforce more tightly with the native user interface. Many features of Visualforce integration such as overriding standard buttons are not supported for pages that use custom controllers.[..]
Visual Force Developer's Guide, by W.A. Chamil Madusanka, Page 26
[..]Controller extensions are used to extend the logic and functionality of a standard controller or a custom controller. A controller extension cannot be on a page without a standard controller or a custom controller. Controller extensions are written using Apex.[..]

Nonetheless, it is no clear to me to what extent we can override the default behaviors of the standard controllers through controller extensions.
The paragraphs of these books and others usually state that it is possible to override default buttons, but they never seem to go any further.
Once I extend the default controller, can I make the standard page use such extension instead of the original one? For instance, can I extend te default controller of the Account object and make the standard account page use my extension instead of the default controller? Or, instead, would I be forced to write a new Visualforce page as the only way to use such extension?
If writing a new Visualforce page were the only option, would I be able to replace the standard page of an object by the new page?
Moreover, would I be able to create a configurable Visualforce page? A page whose layout can be changed by the users just like they can change standard pages?
In a controller extension, would it be possible to override the default behavior of a standard field's setter? For instance, would I be able to tamper with the default behavior of the postal code field when the user changes its value, so that I can look it up in a postal codes' database and auto-fill the street address, city, and state? Literature simply doesn't go this far, neither to confirm such possibility nor to deny it.
Where can I find a list of every single thing that I can do with, and that I can not do, with a controller extension?
Krishna SambarajuKrishna Sambaraju
You need to use a visualforce page to use the controller extension.