Well, but the scenario you are is the same as we have with a plain
forward - and we do handle this scenario well with the t:saveState tag
written exactly for making this work. If you need to reuse the request
parameter on page B you just put in a t:saveState component and you
are done.

Thing is that many, many people (as you can see from this discussion,
and many before) don't want to make use of sessions too much. Sessions
can be a pain in load balancing and server outages, with respect to
memory performance etc.

So we should really make sure that working with request scoped beans
is (as far as possible) as easy as working with session scoped ones -
and not loosing them with a redirect belongs to that in my opinion.

This apart from the lost messages, which in any case are a major pain
in the ass.

And the the locale is not passed over to the next page if a redirect
is happening will then probably be a bug in MyFaces...

regards,

Martin

On 9/4/05, Adam Winer <[EMAIL PROTECTED]> wrote:
> Well, from the perspective of just what the JSF spec says,
> the correct thing is happening - a redirect sets up a new request,
> and everything you list (except Locale actually, which should
> be preserved) gets blown away.
> 
> But from the perspective of making a users life non-painful,
> I find the fact that we discard messages to be extremely
> frustrating - but that we discard request beans to be
> unavoidable, at least as a default.  Communication
> between pages should not happen via the request scope,
> which doesn't really work very well.
> 
> For example, say I use the request scope to pass a parameter
> from page A to page B.  OK, great, page B gets set up
> fine.  Then I click a button which generates a validation error,
> so page B gets displayed.  That's clearly a new request -
> so where's that parameter that B needed?
> 
> One thing about navigational redirects has seemed a clear mistake
> to me - we should not have actually executed the redirect during
> Invoke Application right in the navigation handler, but should have
> simply marked the request as such and postponed actual execution
> to the Render Response phase as a responsibility of the ViewHandler.
> The current approach makes it very, very painful to specialize
> the behavior of a redirect.
> 
> -- Adam
> 
> 
> On 9/2/05, Martin Marinschek <[EMAIL PROTECTED]> wrote:
> > and not only the beans, but also the locale, messages and everything
> > else that is relevant to JSF should be saved over a redirect...
> >
> > we should really find someone to suggest this to the expert group.
> >
> > well, why don't we do it ourselves? Let's ask Craig, Adam and Manfred
> > what they think of this - I am including their addresses here...
> >
> > regards,
> >
> > Martin
> >
> > On 9/2/05, Mario Ivankovits <[EMAIL PROTECTED]> wrote:
> > > CONNER, BRENDAN (SBCSI) wrote:
> > > >That's a good point about redirect; we don't do that. ;-)
> > > >
> > > >Regarding the "browser back" button, I believe that that works OK if you
> > > >set "client-side" state saving, rather than "server-side."  Have you
> > > >tried that?  We have to do "client-side" state saving anyway, because
> > > >otherwise JSF gets confused when we return from our pop-up windows.
> > > >
> > > No, this wont work.
> > >
> > > If it comes to the point where a redirect will be issued due to the
> > > navigation rule there is no chance for JSF to send data to the client.
> > > The state on the client-side is rendered into the html-page.
> > >
> > > Normally the flow is (very, very simplified):
> > >
> > > 1) Request
> > > 2) JSF
> > > 3) Your action code
> > > 4) you modify your request beans
> > > 5) the navigation rule will be applied
> > > 6) the new page will be rendered
> > >
> > > In case of redirect it is:
> > >
> > > 1) Request
> > > 2) JSF
> > > 3) Your action code
> > > 4) you modify your request beans
> > > 5) the navigation rule will be applied
> > > 6) REDIRECT !!!! ->
> > > 7) NEW REQUEST (your "request beans" are lost now as we have a new 
> > > request)
> > > 8) the new page will be rendered
> > >
> > > Now the challenge it to save the beans (maybe marked with saveState)
> > > during the transition from 6 to 7
> > >
> > > ---
> > > Mario
> > >
> > >
> >
> >
> > --
> >
> > http://www.irian.at
> > Your JSF powerhouse -
> > JSF Trainings in English and German
> >
> 
> 


-- 

http://www.irian.at
Your JSF powerhouse - 
JSF Trainings in English and German

Reply via email to