>>>>> On Fri, 14 Oct 2011 21:38:20 +0000 (GMT), <gudnabrsam_at_gmail.com> said:
MB> Would it not be better to revise the behavior of the various
MB> cooperating components such that the redirect is performed *after* the
MB> current phase has completed, making up simply an alternative path in
MB> the implementation of RENDER_RESPONSE? If not, why not? As yet the
MB> most straightforward workaround I have come up with is an
MB> ExternalContextWrapper that intercepts the #redirect() call to do the
MB> necessary cleanup.
The current specification and implementation of
ExternalContext.redirect() means "redirect NOW". I don't want to change
that since it seems likely some applications are depending on the
immediate nature of calling redirect(). However, you do have a good
point: the afterPhase() listeners are not being invoked early enough to
take action based on the redirect().
What would you think if we made it so redirect() retains its immediacy,
but we move up the invocation of the afterPhase() listeners so they
happen before the redirect() actually occurs?
Ed
--
| edward.burns_at_oracle.com | office: +1 407 458 0017
| homepage: | http://ridingthecrest.com/