Currently the RenderResponsePhase loops on the PreRenderViewEvent until the view ID remains unchanged before and after the listeners are notified. However, there is no check for whether the response has been flagged as complete using FacesContext#responseComplete(). The loop should short-circuit and the render step skipped if one of the listeners invokes this method (the check would remain in the same place, after all listeners are invoked on that pass).

https://javaserverfaces.dev.java.net/issues/show_bug.cgi?id=1136

Essentially, a redirect is just as likely as a view ID change in a PreRenderViewEvent listener. This is a critical piece of implementing view actions as an extension. Although, there is one workaround. It's possible to call UIViewRoot#setRendered(false) to prevent the view from being rendered, but that is inconsistent with the standard mechanism, which is to call FacesContext#responseComplete().

-Dan

--
Dan Allen
Senior Software Engineer, Red Hat | Author of Seam in Action

http://mojavelinux.com
http://mojavelinux.com/seaminaction
http://in.relation.to/Bloggers/Dan

NOTE: While I make a strong effort to keep up with my email on a daily
basis, personal or other work matters can sometimes keep me away
from my email. If you contact me, but don't hear back for more than a week,
it is very likely that I am excessively backlogged or the message was
caught in the spam filters.  Please don't hesitate to resend a message if
you feel that it did not reach my attention.