Newer Version Available
Custom Controllers and Controller Extensions
Standard controllers can provide all the functionality you need for a Visualforce page because they include the same logic that is used for a standard page. For example, if you use the standard Accounts controller, clicking a Save button in a Visualforce page results in the same behavior as clicking Save on a standard Account edit page.
However, if you want to override existing functionality, customize the navigation through an
application, use callouts or Web services, or if you need finer control for how information is
accessed for your page, you can write a custom controller or a controller extension using Apex:
- What are Custom Controllers and Controller Extensions?
- Build a Custom Controller
- Building a Controller Extension
- Controller Methods
- Controller Class Security
- Considerations for Creating Custom Controllers and Controller Extensions
- Order of Execution in a Visualforce Page
- Testing Custom Controllers and Controller Extensions
- Validation Rules and Custom Controllers
- Using the transient Keyword