Thursday 28 November 2013

Visualforce Guide | Visualforce Controller

Visual Force

VisualForce
Visualforce is a framework that allows developers to build sophisticated, custom user interfaces that can be hosted natively on the Force.com platform. The Visualforce framework includes a tag-based markup language, similar to HTML.
In the Visualforce markup language, each Visualforce tag corresponds to a coarse or fine-grained user interface component, such as a section of a page, a related list, or a field. The behavior of Visualforce components can either be controlled by the same logic that is used in standard Salesforce pages, or developers can associate their own logic with a controller class written in Apex.
  • In VisualForce page we can write the HTML, CSS, and JavaScript etc…
  • Each visual force is page that contains the tags/components and controllers.
  • Each tag contains attributes and attributes defines the properties of the tag.
    • By default each tag has two attributes.
      • ID: – Id is used to bind the two components together.
      • Rerendered: –    Used to show/hide the component.
    • Controllers: -
      • Standard Controller: -
      • Custom Controller/Controller
      • Extension Controller

Standard Controller

StandardController objects reference the pre-built Visualforce controllers provided by salesforce.com. The only time it is necessary to refer to a StandardController object is when defining an extension for a standard controller. StandardController is the data type of the single argument in the extension class constructor.
  • Standard Controller is used for customization of both standard and custom objects.

Controller

Controller is an apex class which is used to implement all the logic of visualforce page without leveraging the standard functionality.

Extension Controller

Extension is an apex class used to extend or add the functionality to standard or custom controllers.

No comments:

Post a Comment