Thanks, Roger!


2010/5/3 Roger Kitain <>
I think this was an oversight since this was one of the last remaining spec areas that went in.
I will file a spec issue on this.
Thanks for catching it.


On 5/3/10 2:31 PM, David Geary wrote:
There is a <composite:clientBehavior> tag in the 2.0 version of JSF that comes with GlassFish, and it appears to work as advertised by Alexandr and Andy below.

But, as Alexandr points out, itís not documented in the PDL docs, nor could I find any mention of it in the spec (or Edís book, either).

This is a vital tag that lets page authors attach ajax functionality to components within composite components. I see no reason why it should not be documented.

Does anyone know why this tag was not documented in the first place, or what the plans are for its future? Anyone know if it works with MyFaces 2.0?

If thereís not a compelling reason for blacklisting it from the docs, can we document it?



2009/5/26 Alexandr Smirnov <>
Sure, the composite client event tags are not included in the PDL doc.
There is one † † † † † †<composite:clientBehavior> tag with attributes: 'name' -
the virtual event name that composite component has.
'default' "true/false" defines the default event that is enclosed
<f:ajax> tag serves if 'event' attribute was omited.
'event' - the real event name for target component.
'targets' - space-delimited list of component id's for which composite
component behavior or <f:ajax> tag will be redirected.

The model with 'for' attribute was the first implementation but it was
replaced wit 'virtual' event model.

Andy Schwartz wrote:
> David -
> David Geary wrote On 5/24/2009 5:55 PM ET:
>> For JSF 2, we added a "for" attribute to f:actionListener,
>> f:converter, etc., but we don't have a "for" attribute for <f:ajax>.
>> AFAICT, that means that although you can attach listeners, validators,
>> converters, etc. to a component contained in a composite component,
>> you cannot attach Ajax functionality.
>> Why is that? Is it an oversight, or is there some compelling technical
>> reason to disallow adding Ajax behavior to components contained in
>> composites?
> We definitely intended to support this, though instead of exposing a
> "for" attribute on <f:ajax>, we wanted to leverage the fact that
> behaviors already have a targeting mechanism in the "event" name. †The
> idea was that a composite component would, like any other
> ClientBehaviorHolder, expose a set of logical event names that behaviors
> can be attached to. †So, for example, assuming a composite component
> included "OK" and "Cancel" buttons and wanted to allow the user to
> attach action behaviors to these, the composite component might surface
> "okAction" and "cancelAction" event names, allowing the page author to do:
> †<foo:someComposite>
> † †<f:ajax event="okAction"/>
> † †<f:ajax event="cancelAction"/>
> †</foo:someComposite>
> I know that Alexander did the implementation work to get this up and
> running. †However, I do not see any pdldoc for the composite tag that
> the composite component author uses to specify the supported client
> behavior event names (composite:clientBehavior I believe).
> Alex, Roger -
> Did this make it into 2.0?
> Andy
>> Thanks,
>> david