Hi Dave, ---- Dave <[EMAIL PROTECTED]> schrieb: > <context-param> > <param-name>javax.faces.STATE_SAVING_METHOD</param-name> > <param-value>server</param-value> > </context-param> > > <context-param> > <param-name>org.apache.myfaces.NUMBER_OF_VIEWS_IN_SESSION</param-name> > <param-value>20</param-value> > </context-param> > > <context-param> > <param-name>org.apache.myfaces.SERIALIZE_STATE_IN_SESSION</param-name> > <param-value>true</param-value> > </context-param> > > <context-param> > <param-name>org.apache.myfaces.COMPRESS_STATE_IN_SESSION</param-name> > <param-value>false</param-value> > </context-param> > > These parameters are not changed for RI, I am wondering if I need to change > or add some for RI. > > Yes, I use <t:saveState> to save request-scope bean data. > The senarios: > > On window 1, click link A, execute action that changed request scope bean > data Foo, the response was shown on Window 2. It worked well. > > Again on window 1, click link A, this step did not go through Invoke > Application phase. > > It works for MyFaces.
That sounds like you need to set the equivalent of NUMBER_OF_VIEWS_IN_SESSION for the RI. When using server-side state, each page contains a hidden field that contains the id of the view-state tree that was used to generate it. If a postback occurs, and there is no matching cached view state available, then the postback effectively gets converted into a "get" type request, ie no postback processing occurs and just the render phase runs. There is no alternative here; postback processing cannot occur if the component tree cannot be recreated. If the default behaviour of the RI is to keep only the most recent tree view, then that would match what you see: (1) Before any link is clicked, view-state #N is stored in the server. (2) When you click on link A, the postback includes #N as the key. This matches the cached version, so postback processing occurs, causes view-state N+1 to be created on the server, the new page to be rendered (which is displayed in the popup window) and view-state #N to be discarded. (3) When link A is clicked again, the postback includes #N as the key. But there is no such cached view-state, so just a plain render phase runs. I have no idea what the Sun RI equivalent of the NUMBER_OF_VIEWS_IN_SESSION property is. Regards, Simon

