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 ]