Could this be done with a custom application listener of the faces
context? I am too familiar with the spec at that level, but it seems
to be the one in controlling the invoking of the action method? If so,
there could be a custom listener written that has an abort boolean
property or something of the sort, that if set to true will not invoke
the action?

-Andrew

On 5/4/06, Mike Kienenberger <[EMAIL PROTECTED]> wrote:
On 5/4/06, Andrew Robinson <[EMAIL PROTECTED]> wrote:
> I am going on a limb to answer this without first checking MyFaces
> code and the spec, so feel free to correct any errors I am about to
> post.
>
> Calling render response on the faces context will not interrupt the
> current phase, but instead just cause rendering to occur. According to
> what I remember of the JSF spec, you need to call the
> responseComplete() method of the context if you want to abort the
> phase cycle of JSF. With that said, I know that will abort the phase
> cycle, but I don't know if it will abort the current phase (execute
> application or whatever it is called). You can give it a shot though:

Andrew, I was thinking the same thing.   However, I don't think either
method aborts the current phase.  It merely prevents any future phases
from executing.

responseComplete() actually means you've already "drawn" a response
page.   renderResponse does mean what you're saying, which is to skip
to the render response phase.

Matt,  I think your best bet is to look at the LifeCycleImpl code and
see what goes on when renderResponse is true.   I know it kills any
pending events, and you probably can use similar code to kill your
existing action event.    The other thing you can do is have your
action listener set a flag somewhere, and then have your action take a
look at the value of that flag when it starts up.

Reply via email to