Controller Extensions

In Chapter 9: Visualforce Pages, you experienced the different granularity of various Visualforce components. For instance, a single set of tags can create an entire detail page. But if you want to change the way a detail page looks beyond the scope of page layouts, you must build the entire Visualforce page using more discrete components.

Visualforce controllers give you similar options, but with a difference. You can build a custom controller with Apex code that replaces all the functionality of a standard controller, and there are times when this approach may be desirable; however, Visualforce also gives you another option, in the form of controller extensions.

A controller extension uses all the functionality in a standard ...

Get The Developer’s Guide to the Force.com Platform now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.