<div>2010/10/29 Jakob Korherr <span dir="ltr"><<a href="mailto:jakob.korherr@gmail.com">jakob.korherr@gmail.com</a>></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 "insert"<br>
here, because - as you said - it just does not fit that well. However<br>
I really, really like "implements" - this is just soo much better :)<br>
<br>
<h:commandButton ....><br>
<cc:implementsActionSource name="myActionSource" /><br>
</h:commandButton><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'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 "implements action source"? 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 <<a href="mailto:andy.schwartz@oracle.com">andy.schwartz@oracle.com</a>>:<br>
<div><div></div><div class="h5">> Hey Jakob -<br>
><br>
> On 10/29/10 7:02 AM, Jakob Korherr wrote:<br>
>><br>
>> Hi,<br>
>><br>
>> Thinking more of it and trying out some prototypes, I now think<br>
>> Leonardo's approach is the way to go. Of course, it would somehow be<br>
>> possible to circumvent the problems mentioned before (like multiple<br>
>> action listeners or the missing f: tag for client behaviors), but<br>
>> after reading the vdldocs again, I think it's much more consistent<br>
>> with what we have right now.<br>
>><br>
>> Consider the current facet solution: The user can provide facets for<br>
>> the composite component and the author of the composite component can<br>
>> add them to implementation-components via cc:insertFacet.<br>
><br>
> Agreed. I like the consistency in this approach.<br>
><br>
> BTW, and slightly off-topic: composite:insertFacet's "name" attribute<br>
> suffers from the same problem as composite:attribute's "name" attribute: it<br>
> is also used to refer to both the interface name as well as the<br>
> implementation name. See:<br>
><br>
> <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>
><br>
> Interestingly, the recommended solution for this is to also add a<br>
> "targetName" attribute. :-)<br>
><br>
> (This is a slightly different case, since composite:insertFacet lives in the<br>
> implementation section.)<br>
><br>
>> And this is<br>
>> exactly what we need for cc:actionSource, cc:valueHolder,<br>
>> cc:editableValueHolder and cc:clientBehavior.<br>
>><br>
>> Thus I would propose the following new tags (from Leonardo's original<br>
>> proposal):<br>
>><br>
>> <cc:insertActionSource name="XXX" /><br>
>> <cc:insertEditableValueHolder name="XXX"/><br>
>> <cc:insertValueHolder name="XXX" /><br>
>> <cc:insertClientBehavior name="XXX" /><br>
>><br>
>> What do you think?<br>
>><br>
><br>
> I like it. :-) Though I wonder whether "insert" is the right verb to<br>
> describe what this tag is doing. In the <cc:insertFacet> case, we literally<br>
> are inserting a facet component into the component tree. In the<br>
> <cc:insertActionSource> case - we aren't really inserting an action source.<br>
> The action source is already present: it is the parent of the<br>
> <cc:insertActionSource> tag. It seems like the purpose of the<br>
> <cc:insertActionSource> tag is to identify that the parent action source<br>
> component provides the implementation of the action source that is<br>
> identified in the interface section. Perhaps the verb "implements" captures<br>
> this better than "insert"?<br>
><br>
><br>
> <composite:interface><br>
> <composite:actionSource name="loginButton"/><br>
> </composite:interface><br>
><br>
> <composite:implementation><br>
> <h:commandButton><br>
> <composite:implementsActionSource name="loginButton"/><br>
> </h:commandButton><br>
> </composite:implementation><br>
><br>
> In any case, regardless of the tag name, I think that this is a much<br>
> improved approach. Thanks for pushing this Jakob (and Leonardo, Martin and<br>
> Ganesh too)!<br>
><br>
> Andy<br>
><br>
>> Regards,<br>
>> Jakob<br>
>><br>
>><br>
><br>
><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>