dev@jsftemplating.java.net

Re: Stop Processing...

From: Anissa Lam <Anissa.Lam_at_Sun.COM>
Date: Tue, 10 Oct 2006 15:43:54 -0700

Ken,

Thanks a lot for implementing this feature. This is a very useful
feature, especially when we are waiting for the 'ability to
conditionally executes handlers'.

Thanks
Anissa

Ken Paulsen wrote:
>
> I added a check while executing handlers to stop processing. You can
> call:
>
> facesContext.responseComplete();
>
> or:
>
> facesContext.renderResponse();
>
> The first one tells JSF that you have already responded to the
> request, do nothing more. The 2nd says that you're done processing
> (perhaps you ran into a validation failure or other error), and you
> want to go directly to the rendering phase.
>
> Also, JSF provides the ability to throw an "AbortProcessingException"
> which will abort the current phase and proceed to the next. I don't
> think this is quite as graceful, but it's also available (nothing
> special in JSFTemplating to help / hurt that feature).
>
> I also added 2 handlers to invoke responseComplete() /
> renderResponse(). They're not particularly useful except for testing
> this feature. However, when I add the ability to conditionally
> execute handlers, these may become useful.
>
> Thanks,
>
> Ken