Reputation: 14126
Suppose there are 2 JSF pages & a backing bean
index.xhtml- with view parameters & a form
Backing bean- action method with navigation to result.xhtml from index.xhtml with NO REDIRECTION
result.xhtml- no form but outputting some text
Consider a simple case
Fire a GET request to index.xhtml-
Something like this with view parameters-
Phases executed-
Response-
Hit Submit-
Phases executed-
NOTE: It was a POSTBACK, the lifecycle phases were executed for POST request to index.xhtml
Response-
The response contains the contents of result.xhtml page, which were then clearly reflected in the browser window. As it was rendered, the lifecycle must have executed for result.xhtml view too. WHY DON"T I SEE THE PHASES for this view in the console?
I know very well that with redirection, on POSTBACK, the render response phase for index.xhtml will be skipped and then all the phases for result.xhtml will be fired.
Upvotes: 0
Views: 646
Reputation: 1108547
You seem to expect that the lifecycle is view based. This will indeed cause confusion.
In fact, the lifecycle is request based, not view based. That should clear up everything. If you think about it, it's really unnecessary to redo entire cycle of collecting, converting and validating request parameters and update model values and invoke action during the very same HTTP request.
Upvotes: 0