Hi<br><br><div class="gmail_quote">2010/10/28 Ed Burns <span dir="ltr"><<a href="mailto:edward.burns@oracle.com">edward.burns@oracle.com</a>></span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
>>>>> On Thu, 28 Oct 2010 12:17:12 -0500, Leonardo Uribe <<a href="mailto:lu4242@gmail.com">lu4242@gmail.com</a>> said:<br>
<br>
LU> <a href="https://javaserverfaces-spec-public.dev.java.net/issues/show_bug.cgi?id=859" target="_blank">https://javaserverfaces-spec-public.dev.java.net/issues/show_bug.cgi?id=859</a><br>
<br>
LU> and then Ed Burns propose another similar one, but filling the gaps in<br>
LU> documentation and integration with automated tests (That's cool!).<br>
<br>
LU> Instead call it "methodType", it was proposed targetAttributeName and added<br>
LU> this<br>
LU> documentation:<br>
<br>
LU> "...This attribute allows the name of the attribute exposed to the using<br>
LU> page to differ from the one actually used in the implementation. For<br>
LU> example, consider a composite component that contains two buttons, one<br>
LU> that means "submit" and one that means "cancel". It is natural to want<br>
LU> to declare two composite component attributes to allow these buttons to<br>
LU> be customized, for example, "submitAction" and "cancelAction". For both<br>
LU> of these buttons, the method expression should be retargeted to the<br>
<br>
LU> inner button's "action" attribute. This scenario would be expressed as<br>
LU> follows..."<br>
<br>
LU> And the proposal using "targetAttributeName" looks like this:<br>
<br>
As Martin pointed out in a private email, method-signature is optional.<br>
So either of these are valid:<br>
<br>
<cc:interface><br>
<cc:attribute name="submitAction" targetAttributeName="action" /><br>
<cc:attribute name="cancelAction" targetAttributeName="action" /><br>
</cc:interface><br>
<br>
<cc:interface><br>
<cc:attribute name="submitAction" targetAttributeName="action"<br>
method-signature="java.lang.Object action()" /><br>
<cc:attribute name="cancelAction" targetAttributeName="action"<br>
method-signature="java.lang.Object action()" /><br>
</cc:interface><br>
<br></blockquote><div><br>Ok, I did a checkout and the example is there.<br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
LU> In my opinion, the syntax using "methodType" is preferred. In that one, we<br>
LU> are just<br>
LU> defining the attribute is used for the behavioral interface ActionSource, as<br>
LU> an "action",<br>
LU> and the method-signature declaration is not necessary anymore.<br>
<br>
I don't want to introduce the concept of type here. We already have the<br>
concepts of method-signature, MethodExpression, and special attribute<br>
names.<br>
<br>
Therefore, I'm going with targetAttributeName.<br>
<br>
Committed revision 8688.<br>
<br>
<br></blockquote><div><br>Ok, now I understand the intention. Yes, it sound good.<br><br>Thanks Ed for take a look to this issue.<br><br>best regards,<br><br>Leonardo Uribe<br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br>
<br>
<br>
LU> Note that this syntax already works (partially) without the patch:<br>
<br>
LU> <cc:attribute name="submitAction" method-signature="java.lang.Object<br>
LU> action()"/><br>
<br>
LU> I said "partially" because these two method signatures are valid for action:<br>
<br>
LU> java.lang.Object action()<br>
LU> void action()<br>
<br>
LU> The problem is more clear when "actionListener" is considered because it has<br>
LU> these two<br>
LU> valid signatures (since JSF 2):<br>
<br>
LU> void method(javax.faces.event.ActionEvent )<br>
LU> void method()<br>
<br>
LU> It is not possible to map it using method-signature, because it only allows<br>
LU> one of them, but<br>
LU> if we use a notation like this:<br>
<br>
LU> <cc:attribute name="submitActionListener" methodType="actionListener"/><br>
<br>
LU> The previous two signatures are assumed and problem solved. I still think<br>
LU> method-signature should allow multiple ones using ';', but before that (I<br>
LU> want to propose a<br>
LU> patch but not yet), I prefer the proposed patch using methodType.<br>
<br>
LU> Suggestions are welcome.<br>
<br>
LU> best regards,<br>
<br>
LU> Leonardo Uribe<br>
<font color="#888888"><br>
--<br>
| <a href="mailto:edward.burns@oracle.com">edward.burns@oracle.com</a> | office: +1 407 458 0017<br>
| homepage: | <a href="http://ridingthecrest.com/" target="_blank">http://ridingthecrest.com/</a><br>
| 9 work days until German Oracle User's Group Conference<br>
</font></blockquote></div><br>