wood burning stoves 2.0*
The moose likes JSF and the fly likes JSF lifecycle: Transition from Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "JSF lifecycle: Transition from "Invoke application" to "Render view"" Watch "JSF lifecycle: Transition from "Invoke application" to "Render view"" New topic
Author

JSF lifecycle: Transition from "Invoke application" to "Render view"

Dominik Klaholt
Greenhorn

Joined: Nov 01, 2008
Posts: 1
Hello,

i have a problem understanding how exactly the transition from phase "invoke application" to phase "render view" looks like.
Regard the following scenario: At the time "invoke application" is entered, the component tree for, let's say, the submitted registration form page has been built and the model values in the backing bean have been updated. For the click on the submit button an action like "BackingRegister.register()" has been queued. Now, in the "invoke application" phase, this action is executed, BackingRegister.register() is called and the outcome of this message is used by a navigation rule. This navigation rule says, that the next page to be displayed is data.jsp. Data.jsp shows a lot of data, which is retrieved from a database. So data.jsp is associated with a bean called BackingData.java, which retrieves the data from the database.

My problem is: In many tutorials for JSF they say something like "Render view phase displays the view with all of its components in their current state". All the phases up to "invoke application" deal with building and updating the component tree and "render view" displays the components in their current state. However, during "invoke application" navigation rules are triggered. Does JSF build a completely new component tree after a navigation (in my example: a new component tree for data.jsp)? Furthermore, the tutorials say, that all business logic is executed during "invoke application". My data.jsp displays data retrieved from a database. When is the associated backing bean BackingData.java instantiated - and when does an instance of BackingData.java retrieve the data to be displayed? During "invoke application" or during "render view"?

Thanks a lot in advance
Dominik
[ November 01, 2008: Message edited by: Dominik Klaholt ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JSF lifecycle: Transition from "Invoke application" to "Render view"