Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Doubts about JSF proccesing lifecycle and JSF phases

Yeray Santana Borges
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I have doubts about the processing lifecycle of a JSF application if there are two different requests from the same user. For example, suppose an application with two buttons:

Button 1 --> A load button connected to a actionListener method that load a lot of data from data base that will be showed in a table.
Button 2 --> A Cancel button with immediate=true and connected to a action method that force a navigation to the same page when is pressed.

Suppose the following sequence:

1 -. User press button 1, I think that the following phases are executed:
Request View --> Apply Request Values --> Proccess Validation --> Update model Values --> Invoke Application (in this phase the actionListener method is executed to load the data from database) --> Render Response (take long time)

2-. Due to a big quantity of data the Render Response take long time and when the lifecycle is in that phase the user press the button 2. I suppose that the following sequence of phases are executed:
Request View --> Apply Request Values -->Invoke Application (Action method that return a navigation case) --> Render Response (Render the page to the user)

My question is, if the first request is in the Render Response phase, what happens with this phase when the second request generated by the Button 2 arrive to the server??? When the second request arrive to the server, JFS automatically cancel or stop the proccesing of the Render Response of the first request ?

Thank you.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic