JSF Questions and Answers

Explain the life cycle of JSF?

Life cycle of JSF includes

  • Restore view phase: During this phase binding of components to its event handlers and validators are executed and view is saved in the FacesContext object
  • Apply request values phase: The motive of this phase is to retrieve its current date for each component
  • Process validation phase: During this phase, local values saved for the component in the tree are compared to the components validation rules registered
  • Update model value phase: After verifying, that data is genuine or valid in the previous phase, local values of components can be set to related server side object properties
  • Invoke application phase: Prior to this phase the component values have been transformed, validated and applied to the bean objects, so that you can avail them to run the application’s business logic
  • Render response phase: JSP container renders the page back to the user in this phase