Book Image

Learning Force.com Application Development

By : Chamil Madusanka
Book Image

Learning Force.com Application Development

By: Chamil Madusanka

Overview of this book

Table of Contents (21 chapters)
Learning Force.com Application Development
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

The order of execution of a Visualforce page


Every Visualforce page is executed according to a life cycle. This life cycle is determined from the creation of the page and its destruction during the user session. There are two types of Visualforce page request that define the life cycle of a particular page:

  • Get request

  • Postback request

Get requests of a Visualforce page

The get request is created after you request a new page by entering a URL or clicking on a button/link. The following diagram shows the behavior of the get request and how the Visualforce page interacts with the controller during the get request:

Order of execution for get requests of a Visualforce page

The order of execution is as follows:

  1. First, it initiates the controller objects by calling the constructor method.

  2. If there are any custom components, they are created and constructor methods are called on their associated class. If any attribute is specified in a component using an expression, those expressions are also evaluated...