Types of JSF Events
In traditional JSF applications, event handling typically takes place on the server. JSF event handling is based on the JavaBeans event model, where event classes and event listener interfaces are used by the JSF application to handle events generated by components. For a JSF application to be able to respond to user events, you typically register event listeners on the components that would generate events. The following types of events are supported:
A phase event or listener is executed as part of the standard JSF life cycle. You can add to the standard behavior by implementing your own phase listener.
An action event occurs when a command component is activated. For example, when a user clicks a button or a link, the form containing the component is submitted, and the component creates an event object that stores information about the event and identifies the component that generated the event. The event is also added to an event queue. At the appropriate time in the JSF life cycle, JSF tells the component to broadcast the event to the appropriate registered listener, which invokes the listener method that processes the event. Events may trigger a change in the user interface or invoke back-end application code, or both. The return value of an action event is usually used for navigation.
A value change event occurs when the local value of an input component changes; it fires only after component value validation and form submission.