Skip to Main Content
Mastering JavaServer Faces 2.2
book

Mastering JavaServer Faces 2.2

by Anghel Leonard
June 2014
Intermediate to advanced content levelIntermediate to advanced
578 pages
12h 2m
English
Packt Publishing
Content preview from Mastering JavaServer Faces 2.2

Configuring action listeners

Action listeners are a great facility provided by JSF for dealing with action events. Commonly, action listeners are attached to command buttons (<h:commandButton>) or command links (<h:commandLink>) using the actionListener attribute.

When a button/link is clicked, JSF calls the action listener during the Invoke Application phase. Notice that if you are using immediate="true", then the action listener is called during the Apply Request Values phase. The method, indicated as a listener, should be public, should return void, and should accept an ActionEvent object (this object can be used to access the component that invoked the action), which can perform specific tasks. When its execution has finished, JSF will call ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

JavaServer Faces

JavaServer Faces

Hans Bergsten

Publisher Resources

ISBN: 9781782176466Supplemental Content