Name

<f:valueChangeListener>

Synopsis

This action creates an instance of the class defined by the type attribute, which must implement the javax.faces.event.ValueChangeListener interface, and adds it to the component represented by the closest JSF component parent action element.

For an alternative, see the valueChangeListener attributes for the HTML library that represents JSF input components.

Syntax

<f:valueChangeListener type="className" />

Attributes

Attribute name

Java type

EL expression type

Description

type
String

Any

The fully qualified class name for a class implementing the ValueChangeListener interface.

Example

<h:form>
  <h:selectBooleanCheckbox value="Details" immediate="true">
    <f:valueChangeListener type="com.mycompany.DescrLevelListener" />
  </h:selectBooleanCheckbox>
</h:form>

Get JavaServer Faces 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.