<div>2010/10/29 Jakob Korherr <span dir="ltr">&lt;<a href="mailto:jakob.korherr@gmail.com">jakob.korherr@gmail.com</a>&gt;</span></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi guys,<br>
<br>
Thanks, Andy! Frankly I also do not really like the term &quot;insert&quot;<br>
here, because - as you said - it just does not fit that well. However<br>
I really, really like &quot;implements&quot; - this is just soo much better :)<br>
<br>
&lt;h:commandButton ....&gt;<br>
    &lt;cc:implementsActionSource name=&quot;myActionSource&quot; /&gt;<br>
&lt;/h:commandButton&gt;<br>
<br>
Really beautiful!</blockquote><div><br></div><meta charset="utf-8"><div>It seems that I am perhaps the only dissenting voice here, but I don&#39;t care for this solution. </div><div><br></div><div>To those of us that understand the rationale for removing targets and adding these cc:implements... tags, the new tags make perfect sense. But to the uninitiated, they will be bewildering. What does it mean for a button to &quot;implements action source&quot;? Buttons already implement action source. IMO, targets are much easier to understand, and to explain.</div>
<div><br></div><div>I understand the urge to remove the targets attribute based on their OO impurity, but I think the solution could use some more thought. There are already too many arcane oddities in JSF, whose rationale is only intuited by high priests, and I hate to see us adding more.</div>
<div><br></div><div><br></div><div>david</div><div><br></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
@Leonardo: I will open an issue for this on MyFaces tomorrow and<br>
provide some patches for it asap!<br>
<br>
Regards,<br>
Jakob<br>
<br>
2010/10/29 Andy Schwartz &lt;<a href="mailto:andy.schwartz@oracle.com">andy.schwartz@oracle.com</a>&gt;:<br>
<div><div></div><div class="h5">&gt; Hey Jakob -<br>
&gt;<br>
&gt; On 10/29/10 7:02 AM, Jakob Korherr wrote:<br>
&gt;&gt;<br>
&gt;&gt; Hi,<br>
&gt;&gt;<br>
&gt;&gt; Thinking more of it and trying out some prototypes, I now think<br>
&gt;&gt; Leonardo&#39;s approach is the way to go. Of course, it would somehow be<br>
&gt;&gt; possible to circumvent the problems mentioned before (like multiple<br>
&gt;&gt; action listeners or the missing f: tag for client behaviors), but<br>
&gt;&gt; after reading the vdldocs again, I think it&#39;s much more consistent<br>
&gt;&gt; with what we have right now.<br>
&gt;&gt;<br>
&gt;&gt; Consider the current facet solution: The user can provide facets for<br>
&gt;&gt; the composite component and the author of the composite component can<br>
&gt;&gt; add them to implementation-components via cc:insertFacet.<br>
&gt;<br>
&gt; Agreed.  I like the consistency in this approach.<br>
&gt;<br>
&gt; BTW, and slightly off-topic: composite:insertFacet&#39;s &quot;name&quot; attribute<br>
&gt; suffers from the same problem as composite:attribute&#39;s &quot;name&quot; attribute: it<br>
&gt; is also used to refer to both the interface name as well as the<br>
&gt; implementation name.  See:<br>
&gt;<br>
&gt; <a href="https://javaserverfaces-spec-public.dev.java.net/issues/show_bug.cgi?id=631" target="_blank">https://javaserverfaces-spec-public.dev.java.net/issues/show_bug.cgi?id=631</a><br>
&gt;<br>
&gt; Interestingly, the recommended solution for this is to also add a<br>
&gt; &quot;targetName&quot; attribute. :-)<br>
&gt;<br>
&gt; (This is a slightly different case, since composite:insertFacet lives in the<br>
&gt; implementation section.)<br>
&gt;<br>
&gt;&gt;  And this is<br>
&gt;&gt; exactly what we need for cc:actionSource, cc:valueHolder,<br>
&gt;&gt; cc:editableValueHolder and cc:clientBehavior.<br>
&gt;&gt;<br>
&gt;&gt; Thus I would propose the following new tags (from Leonardo&#39;s original<br>
&gt;&gt; proposal):<br>
&gt;&gt;<br>
&gt;&gt; &lt;cc:insertActionSource name=&quot;XXX&quot; /&gt;<br>
&gt;&gt; &lt;cc:insertEditableValueHolder name=&quot;XXX&quot;/&gt;<br>
&gt;&gt; &lt;cc:insertValueHolder name=&quot;XXX&quot; /&gt;<br>
&gt;&gt; &lt;cc:insertClientBehavior name=&quot;XXX&quot; /&gt;<br>
&gt;&gt;<br>
&gt;&gt; What do you think?<br>
&gt;&gt;<br>
&gt;<br>
&gt; I like it. :-)  Though I wonder whether &quot;insert&quot; is the right verb to<br>
&gt; describe what this tag is doing.  In the &lt;cc:insertFacet&gt; case, we literally<br>
&gt; are inserting a facet component into the component tree.  In the<br>
&gt; &lt;cc:insertActionSource&gt; case - we aren&#39;t really inserting an action source.<br>
&gt;  The action source is already present: it is the parent of the<br>
&gt; &lt;cc:insertActionSource&gt; tag.  It seems like the purpose of the<br>
&gt; &lt;cc:insertActionSource&gt; tag is to identify that the parent action source<br>
&gt; component provides the implementation of the action source that is<br>
&gt; identified in the interface section.  Perhaps the verb &quot;implements&quot; captures<br>
&gt; this better than &quot;insert&quot;?<br>
&gt;<br>
&gt;<br>
&gt;  &lt;composite:interface&gt;<br>
&gt;   &lt;composite:actionSource name=&quot;loginButton&quot;/&gt;<br>
&gt;  &lt;/composite:interface&gt;<br>
&gt;<br>
&gt;  &lt;composite:implementation&gt;<br>
&gt;   &lt;h:commandButton&gt;<br>
&gt;     &lt;composite:implementsActionSource name=&quot;loginButton&quot;/&gt;<br>
&gt;   &lt;/h:commandButton&gt;<br>
&gt;  &lt;/composite:implementation&gt;<br>
&gt;<br>
&gt; In any case, regardless of the tag name, I think that this is a much<br>
&gt; improved approach.  Thanks for pushing this Jakob (and Leonardo, Martin and<br>
&gt; Ganesh too)!<br>
&gt;<br>
&gt; Andy<br>
&gt;<br>
&gt;&gt; Regards,<br>
&gt;&gt; Jakob<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;<br>
&gt;<br>
<br>
<br>
<br>
</div></div><div><div></div><div class="h5">--<br>
Jakob Korherr<br>
<br>
blog: <a href="http://www.jakobk.com" target="_blank">http://www.jakobk.com</a><br>
twitter: <a href="http://twitter.com/jakobkorherr" target="_blank">http://twitter.com/jakobkorherr</a><br>
work: <a href="http://www.irian.at" target="_blank">http://www.irian.at</a><br>
</div></div></blockquote></div><br>