O'Reilly logo

Mastering JavaServer Faces 2.2 by Anghel Leonard

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Configuring system event listeners

JSF 2.0 allows us to use system events. These are events that can be fired by arbitrary objects at arbitrary points during the request processing lifecycle. Since the number of these events is quite big, you will not see them entirely covered here, but the next five examples should clarify the basic aspects of system events. You can find all of them in the javax.faces.event package.

Using <f:event>

The easiest way to use system event listeners consists in passing the name of the managed bean method in the listener attribute of the <f:event> tag. For example, PostValidateEvent is a system event that gets fired after all components are validated. This can be useful to validate multiple components. Suppose, that a ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required