Event-Driven Programming
Recall that client-side Java programming can be event-driven:
- ActionEvent: Fired when user clicks button or types Enter
in a text field.
- MouseEvent: Fired when mouse button is clicked or mouse cursor
moves into or out of a component.
- ChangeEvent: Fired when, for example, a slider knob is moved.
Server-side programming can also be event-driven. JSF support three kinds of
events:
- Value change events, such as selecting a new item from a menu.
- Action events, such as clicking a button.
- Phase events, which are routinely fired in the JSF life cycle.