On Tue, Jun 2, 2009 at 3:07 AM, Ken Paulsen
<Ken.Paulsen@sun.com> wrote:
Hi Dan,
How is <s:viewAction ... /> different than <f:event /> (besides that it is not generalized)?
Navigation. It is all about declarative navigation. After each expression evaluated, the navigation handler is consulted and if a navigation case is matched, the remaining actions are short-circuited. If the navigation is a redirect, the response is wrapped up and the redirect followed (FacesContext#responseComplete()). If their is just a view ID change, the process vamps. The developer does not have to do anything special to get that functionality.
Executing a view action (or preRenderViewEvent listener) on a non-faces request is like executing the the restore view. Andy and I worked hard to specify that processing of the f:metadata facet does not build the component tree. That's because the very presence of a view action could circumvent rendering of that component tree, hence making it a wasted operation. The component tree is only built once the preRenderViewEvent listeners complete and the response is not ended.
-Dan