| Value Changes | Actions | |
|---|---|---|
| JSF Tag: | f:valueChangeListener | f:actionListener |
| Interface Type: | ValueChangeListener | ActionListener |
| Interface Method: | processValueChange | processAction |
Q: Why use listener tags rather than attributes?
A: Can specify multiple listeners using tags:
<h:commandButton image="mountrushmore.jpg" action="#{rushmore.navigate}">
<f:actionListener type="com.corejsf.RushmoreListener"/>
<f:actionListener type="com.corejsf.ActionLogger"/>
</h:commandButton>
The first listener processes mouse events; the second logs action events.
When there are multiple listeners, their invocation order is: