You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by lightbulb432 <ve...@hotmail.com> on 2007/01/02 07:01:29 UTC

actionListener type and binding

What's the difference between the type and binding attributes of the
f:actionListener tag? It seems you can use both, but I'm not sure what the
differences are.

Thanks.
-- 
View this message in context: http://www.nabble.com/actionListener-type-and-binding-tf2906590.html#a8120336
Sent from the MyFaces - Users mailing list archive at Nabble.com.


Re: actionListener type and binding

Posted by Clemens Schneider <cl...@gmail.com>.
The type attribute refers to an "anonymous" listener class which implements
ActionListener and will be instanciated and registered to the UICommand
component. If the binding attribute is present, it will be evaluated (must
be a ValueExpression/ValueBinding) and the resulting object, which must
impolement ActionListener, too, will be registered.
binding will be evaluated first and if no appropriate listener can be found,
the type attribute will be used.
(see f:actionListener in JSF Spec)

2007/1/2, lightbulb432 <ve...@hotmail.com>:
>
>
> What's the difference between the type and binding attributes of the
> f:actionListener tag? It seems you can use both, but I'm not sure what the
> differences are.
>
> Thanks.
> --
> View this message in context:
> http://www.nabble.com/actionListener-type-and-binding-tf2906590.html#a8120336
> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>
>