Event Handling is one of the important concepts in JSF.
Event Handling Example
Event Handling is one of the important concepts in JSF. This section provides a simple JSF application, which explains how to implement ?immediate? event handling in JSF. Immediate event handling is useful in cases where you do not need to validate an entire page to process
a user input. Normally, the event handler for components executes in the invoke application phase. But when the ?immediate? attribute is set to ?true? for the component then event executes in the apply request values phase and
forces JSF to skip directly to the render response phase leaving all intermediate phases of the life cycle. In this case the whole form is not validated before event handler is invoked and displays response directly.
This application takes both types of events i.e. Value Change Event and Action Event. When the user changes its choice from the list of song, a value change
event occurs which displays detailed information of the selected song and when it clicks a radio button to select a category
of books, a value change listener event is fired for this component which displays subcategory of the selected category i.e. displays a list of books of the selected category.
Read more at: