<f:valueChangeListener >
Hi anyone know if it is possible to
<f:valueChangeListener >
but instead of writing a class that implements ValueChangeListener
use the tag like you would use a inline ValueChangeListener
e.g
<h:selectOneMenu
valueChangeListener="#{bean1.method1}"
valueChangeListener="#{bean2.method2}"
anyone know if there is anyway i can do something like this?>
[419 byte] By [
dboyd68a] at [2007-10-2 10:08:04]

In short, no. If you use the f:valueChangeListener tag you'll need a class that implements ValueChangeListener.
However, you could work around this a bit. Usually, the biggest advantage to having an inline method as opposed to a seperate listener class is that you have access to your local bean variables. So you could technically implement the ValueChangeListener interface from your bean. Nothing stops you from using the same class for two purposes (1. being the ValueChangeListener and 2. being the bean).
I wouldn't recomment this approach though. It's sloppy and more liable to break in the future. Also, you can only create one ValueChangeListener per component using this method. i.e. If you want two f:valueChangeListener tags on a single component, they both can't point to the above work around. You need one class per ValueChangeListener implementation (or start using the inline methods).
Hope this helps,
CowKIng