By Janice J. Heiss on Nov 30, 2011
As McGinn observes: “A view action operates like a button command (UICommand) component. By default, it is executed during the Invoke Application phase in response to an initial request. However, as you'll see, view actions can be invoked during any phase of the lifecycle and, optionally, during postback, making view actions well suited to performing preview checks.”
McGinn explains that the JavaServer Faces 2.2 view action feature offers several advantages over the previous method of performing evaluations before a page is rendered:
* View actions can be triggered early on, before a full component tree is built, resulting in a lighter weight call.
* View action timing can be controlled.
* View actions can be used in the same context as the GET request.
* View actions support both implicit and explicit navigation.
* View actions support both non-faces (initial) and faces (postback) requests.
Read the complete article here.