<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html; charset=windows-1252"
 http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Filed as:
<a class="moz-txt-link-freetext" href="https://javaserverfaces-spec-public.dev.java.net/issues/show_bug.cgi?id=791">https://javaserverfaces-spec-public.dev.java.net/issues/show_bug.cgi?id=791</a><br>
<br>
-roger<br>
<br>
<br>
On 5/3/10 2:31 PM, David Geary wrote:
<blockquote
 cite="mid:h2v75fa9e651005031131xa33e6f84h4048933e08887107@mail.gmail.com"
 type="cite">
  <meta http-equiv="Context-Type"
 content="text/html; charset=windows-1252">
There is a &lt;composite:clientBehavior&gt; tag in the 2.0 version of
JSF that comes with GlassFish, and it appears to work as advertised by
Alexandr and Andy below.
  <div><br>
  </div>
  <div>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).</div>
  <div><br>
  </div>
  <div>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.</div>
  <div><br>
  </div>
  <div>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?</div>
  <div><br>
  </div>
  <div>If there’s not a compelling reason for blacklisting it from the
docs, can we document it?</div>
  <div><br>
  </div>
  <div>Thanks,</div>
  <div><br>
  </div>
  <div><br>
  </div>
  <div>david<br>
  <div><br>
  </div>
  <div><br>
  <br>
  <div>2009/5/26 Alexandr Smirnov <span>&lt;<a moz-do-not-send="true"
 href="mailto:asmirnov@exadel.com">asmirnov@exadel.com</a>&gt;</span><br>
  <blockquote>Sure, the composite client event tags are not included in
the PDL doc.<br>
There is one            &lt;composite:clientBehavior&gt; tag with
attributes: 'name' -<br>
the virtual event name that composite component has.<br>
'default' "true/false" defines the default event that is enclosed<br>
&lt;f:ajax&gt; tag serves if 'event' attribute was omited.<br>
'event' - the real event name for target component.<br>
'targets' - space-delimited list of component id's for which composite<br>
component behavior or &lt;f:ajax&gt; tag will be redirected.<br>
    <br>
The model with 'for' attribute was the first implementation but it was<br>
replaced wit 'virtual' event model.<br>
    <div>
    <div><br>
Andy Schwartz wrote:<br>
&gt; David -<br>
&gt;<br>
&gt; David Geary wrote On 5/24/2009 5:55 PM ET:<br>
&gt;&gt; For JSF 2, we added a "for" attribute to f:actionListener,<br>
&gt;&gt; f:converter, etc., but we don't have a "for" attribute for
&lt;f:ajax&gt;.<br>
&gt;&gt; AFAICT, that means that although you can attach listeners,
validators,<br>
&gt;&gt; converters, etc. to a component contained in a composite
component,<br>
&gt;&gt; you cannot attach Ajax functionality.<br>
&gt;&gt;<br>
&gt;&gt; Why is that? Is it an oversight, or is there some compelling
technical<br>
&gt;&gt; reason to disallow adding Ajax behavior to components
contained in<br>
&gt;&gt; composites?<br>
&gt;<br>
&gt; We definitely intended to support this, though instead of exposing
a<br>
&gt; "for" attribute on &lt;f:ajax&gt;, we wanted to leverage the fact
that<br>
&gt; behaviors already have a targeting mechanism in the "event" name.
 The<br>
&gt; idea was that a composite component would, like any other<br>
&gt; ClientBehaviorHolder, expose a set of logical event names that
behaviors<br>
&gt; can be attached to.  So, for example, assuming a composite
component<br>
&gt; included "OK" and "Cancel" buttons and wanted to allow the user to<br>
&gt; attach action behaviors to these, the composite component might
surface<br>
&gt; "okAction" and "cancelAction" event names, allowing the page
author to do:<br>
&gt;<br>
&gt;  &lt;foo:someComposite&gt;<br>
&gt;    &lt;f:ajax event="okAction"/&gt;<br>
&gt;    &lt;f:ajax event="cancelAction"/&gt;<br>
&gt;  &lt;/foo:someComposite&gt;<br>
&gt;<br>
&gt; I know that Alexander did the implementation work to get this up
and<br>
&gt; running.  However, I do not see any pdldoc for the composite tag
that<br>
&gt; the composite component author uses to specify the supported client<br>
&gt; behavior event names (composite:clientBehavior I believe).<br>
&gt;<br>
&gt; Alex, Roger -<br>
&gt;<br>
&gt; Did this make it into 2.0?<br>
&gt;<br>
&gt; Andy<br>
&gt;<br>
&gt;&gt;<br>
&gt;&gt; Thanks,<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; david<br>
    </div>
    </div>
  </blockquote>
  </div>
  <br>
  </div>
  </div>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">-- 
<a class="moz-txt-link-abbreviated" href="mailto:roger.kitain@oracle.com">roger.kitain@oracle.com</a>
<a class="moz-txt-link-freetext" href="https://twitter.com/rogerk09">https://twitter.com/rogerk09</a>
<a class="moz-txt-link-freetext" href="http://www.java.net/blogs/rogerk">http://www.java.net/blogs/rogerk</a>  

</pre>
</body>
</html>