Registering Listeners on Components

A page author can register a listener implementation class on a component by nesting either a valuechangeListener tag or an actionListener tag within the component's tag on the page.

An application developer can instead implement these listeners as backing bean methods. To reference these methods, a page author uses the component tag's valueChangeListener and actionListener attributes, as described in Referencing a Method That Handles an ActionEvent (page 721) and Referencing a Method That Handles a ValueChangeEvent (page 722).

The Duke's Bookstore application includes a value-change listener implementation class but does not use an action listener implementation class. This section explains how to register ...

Get The J2EE™ Tutorial Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.