JSF Life Cycle

This section will describe you JSF life cycle. Life cycle of JSF specifies the phases of execution of JSF based applications.


 

Ads

Tutorials   
JSF Tutorials: Easy steps to learn JSF Java Server Faces (JSF) Tutorials What is JSF Mojarra? JSF Life Cycle JSF Examples JSF Tutorial For Beginners Roseindia JSF Tutorial JSF core Tag Reference JSF internationalization example Tomahawk selectOneCountry tag RCFaces About Hibernate, Spring and JSF Integration Tutorial Creating Login Page In JSF using NetBeans JSF Hello World Declaring the Bean class in the faces-config.xml file Creating a Web Application with the JSF Framework Binding the Form Elements With the Bean Properties Adding Navigation in JSF Application Binding Component Instance to a Bean Property Tomahawk validateEqual tag Tomahawk validateEmail tag Tomahawk validateCreditCard tag Tomahawk selectOneListbox tag Tomahawk selectManyListbox tag Tomahawk selectManyCheckbox tag Tomahawk selectBooleanCheckbox tag Tomahawk saveState tag Tomahawk popup tag Tomahawk inputCalendar tag Tomahawk htmlTag tag Tomahawk graphicImage tag Tomahawk documentHead tag Tomahawk documentBody tag Tomahawk document tag Tomahawk column tag DataBase Connectivity with MySql in Visual Web JSF Application Using Net Beans IDE Retrieve Image in JSF From MySQL Table Using NetBeans IDE JSF Training Java Sever Faces 1.2 - JSF 1.2 Display Data from Database in JSF Application Business Objects of Business Logic tier Setup MySQL Database Working with Database through JDBC Working with JavaScript & CSS Referencing a Localized Message Referencing Resource Bundle from a Page Binding Component Value to an Implicit Object Phase Listener Value Change Event Listener Action Event Listener
Ads

JSF Life Cycle

In this section we will discuss about life cycle of JSF.

This section will describe you JSF life cycle. Life cycle of JSF specifies the phases of execution of JSF based applications. A JSF application follows a certain life cycle for every request and response. Request for the JSF page can be generated from the JSF page or a non JSF page and as similar the response can be given to JSF and/or non JSF page. The request and response for the JSF application can be as follows :

  • Non-JSF Request -> Non-JSF Response
  • Non-JSF Request -> JSF Response
  • JSF Request -> Non-JSF Response
  • JSF Request -> JSF Responses

As we have discussed earlier JSF specifies the life cycle phases for any JSF enabled application. JSF life cycle phases are as follows :

  1. Restore View Phase : Restores the required data to process the coming request.
     
  2. Apply Request Values Phase : In this phase each component retrieves the new value from the request parameters and is kept locally on the component.
     
  3. Process Validations Phase : In this phase all the validations that are registered on the components are processed by the JSF implementation.
     
  4. Update Model Values Phase : In this phase if the data is valid the components local value is fix by the corresponding server-side object properties.
     
  5. Invoke Application Phase : In this phase application-level events like form submission, linking to another page are handled.
     
  6. Render Response Phase : This is a final phase of the JSF life cycle. In this phase a response page is assigned for rendering into its container. For example if a response page is a JSP page then it will be rendered to the JSP container.
     

Following image demonstrates the life-cycle of JSF

Advertisements

Share on Google+Share on Google+

JSF Life Cycle

Posted on: May 11, 2013 If you enjoyed this post then why not add us on Google+? Add us to your Circles

Advertisements

Ads
 

Discuss: JSF Life Cycle  

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Comments:0

Ads

 

Ads