Tuesday 18 June 2013


Controller


The controller is Apex code that reads and writes data in the model, typically theForce.com database.The interaction of the controller with the user interface is accomplished through variables and action methods.Variables are exposed to the presentation layer through getter and setter methods. Getter methods allow the page to retrieve the value of a variable and display it for the user. Setter methods allow the user to modify the value of a variable through a user interface component such as a text input box.

Action methods perform the processing work on behalf of the user.They are wired up to buttons, links, and even asynchronous events on the user interface.

Force.com provides default controller implementations, called standard controllers. Standardcontrollers replicate the behavior of the native user interface, such as editing and creating records, but allow customization of its user interface without code. Custom behavior can be added to standard controllers using controller extensions, which are classes written in Apex.You can also implement a controller from scratch in Apex.This is called a customcontroller.


No comments:

Post a Comment