It is not clear, weather you use "redirect" navigation rule. If you don't use 
<redirect/> for navigation rule, you can refer bean2 directly from bean1:
FacesContext fctx = FacesContext.getCurrentContext()
Bean2 b2 = fctx.getApplication().getVariableResolver().resolveVariable( fctx, 
"bean2" );

Alternatively you can use managed property to let JSF provide bean1 with link 
to bean2 automatically.
Then, you can just set all necessary values in bean2 from bean1. Note, that if 
bean2 is request-scoped then this method will work only if you don't use 
<redirect/>. As otherwise bean2 will be reinstantiated after invokeApplication 
phase and all bean2 fields' values will be effectively lost. Your option in 
this case is to use session to store bean2 directly or not.



> 
> Sorry original message was without subject field.
> 
> -----Original Message-----
> From: Evgeniy Karimov <[EMAIL PROTECTED]>
> To: [email protected]
> Date: Thu, 06 Sep 2007 12:57:07 +0400
> Subject: 
> 
> > 
> > Hi, I have a small question:
> > 
> > I have a .faces page, that collects some data from user. All state is kept 
> > at client side via Tomahawk saveState component. And after user clicks 
> > "Next step" button, I want to redirect him to next page, and pass the 
> > collected data to that .faces page. What is best method to perform that?
> >  I dont wont to pass object with data via session scope bean, because I 
> > want the page1 pass object exclusively to page2, not via 
> > all-pages-accessible session scope. Is there a way to do it? Like write a 
> > page2's request bean, so it can be then stored in saveState?
> >  There is something about this problem in saveState source comments, but I 
> > can get how to perform this two action (redirect and pass object) to 
> > achieve my aid.
> > 
> >     Thanks in advance.
> > 
> 

Reply via email to