Wiki

Clone wiki

Oracle JSF Expert 1Z0-896 / JSF Life Cycle

JSF Life Cycle

Send request     ---------> Restore view ---------> Apply request values ---------> Process Validations ------ 
                                  |      ____________|                                       |                |
                                  |     /   immediate components                             |                |
                                  |    / - Inputs conversion + validation val change list not|                |
                                 \|/  /  - Action list not, actions invoked                 \|/               |
Receive response <--------- Render view  <--------- Invoke application  <--------- Update model values        |
                                 ^                                                                            |
                                 |____________________________________________________________________________|
                                                   (conversion or validation errors render response)
  1. Restore view: Retrieves component tree if displayed previously, or constructs new component tree if first time requested. Will check to see if there are any request values otherwise, if not it moves straight on to the render view phase.
  2. Apply request values: Iterates over component tree, each component checks which request values apply to it and stores them.
  3. Process validations: This is where conversions/validations are processed, if there is any error with a components conversion/validation it will move on to the render view phase and render the errors.
  4. Update model values: If the conversions/validations passed without issue the models associated with the view will have their values updated.
  5. Invoke application: This is where the action is executed to determine the navigation result.
  6. Render view: The view is encoded and sent to the client browser for display.

If any input componets are marked as immediate the conversion and validation are executed in the apply request values phase and value change listeners are notified

If any action components are marked as immediate, their action listeners are notified and their actions are invoked. Also in the apply request values phase

Updated