Life Cycle Of ADF with Example

In the below example I have a form with a HireDate input text and a submit button :                                                                                 Image

In ADF Life cycle , when a request is sent from client to Server  :

  1. Restore View: The request  from a page is passed to bindingContext, which finds the page definition file that matches the URL. All the component tags, event handlers, converters, and validators on the submitted page have access to theFacesContext instance.
  2. Initialize Context : BindingContainer object which is the runtime representation of the page definition is initialized.LifecycleContext object which stores the information about ADF lifecycle is initialized with the values of associated request, binding container.
  3. Prepare Model: BindingContainer object prepares the page parameters.This phase prepares and evaluates any page or task flow parameters and refreshes application executables.
  4. Apply Input Values :What ever the values you entered in the input text (HireDate as in our example ) gets stored in a temporary location  and initialized. Most associated events(like action events and value change events ..etc .. ) are queued for later processing.
  5. Process Validations:Local values of components are converted from the input type to the underlying data type.In our example lets say we entered the text value as ’24-Aug-2013’ . This value is stored in Temporary location in Apply input values phase . Now the local value is which is by default in String format is converted to the underlying datatype format. In this example we have input text component data type as Date datatype (HireDate), so the string is converted into Date datatype and validated.If the converter fails, this phase continues to completion (all remaining converters, validators, and required checks are run), but at completion, the lifecycle jumps to the Render Response phase.If the converter validation is successful it will move to the Update Model Phase .
  6. Update Model Phase :The component values are updated in the model and local values are discarded.
  7. Validate Model Updates:In this phase the updated attribute value is validated even in the entity level where we can define our validation at entity level . If the validation is successful it will move to the Invoke Application phase.
  8. Invoke Application :In this phase the Action events are triggered and  is passed to the Render response phase.
  9. Render response :The page is built during this phase.

Hope this helps !!!!!!!!

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a comment