Life cycle is consist of the six step .but main question is that .when the life cycle is start ?
the life cycle is depend on the request of user .the request is also divided into two part
1-initial request
2-post back
flow of the life cycle is depend on these request .
Initial request :
1-using the address of the jsf we call jsf pages .this type of the request is call initial request
2-When a user makes an initial request for a page, he or she is requesting the page for the first time.
3-If the request for the page is an initial request, the JavaServer Faces implementation creates an empty view during Restore View Phase phase and the life cycle advances to the render response phase. The empty view will be populated when the page is processed during a postback.
4-it only executes the restore view and render response phases because there is no user input or actions to process.
Post Request :
1-when user click on any link or button in jsf page this post request created .
2-When a user executes a postback, he or she submits the form contained on a page that was previously loaded into the browser as a result of executing an initial request.
3-when the life cycle handles a postback, it executes all of the phases.
4-If the request for the page is a postback, a view corresponding to this page already exists. During this phase, the JavaServer Faces implementation restores the view by using the state information saved on the client or the server.
No comments:
Post a Comment