Hi<br><br><div class="gmail_quote">2010/10/28 Ed Burns <span dir="ltr">&lt;<a href="mailto:edward.burns@oracle.com">edward.burns@oracle.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
&gt;&gt;&gt;&gt;&gt; On Thu, 28 Oct 2010 12:17:12 -0500, Leonardo Uribe &lt;<a href="mailto:lu4242@gmail.com">lu4242@gmail.com</a>&gt; said:<br>
<br>
LU&gt; <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&gt; and then Ed Burns propose another similar one, but filling the gaps in<br>
LU&gt; documentation and integration with automated tests (That&#39;s cool!).<br>
<br>
LU&gt; Instead call it &quot;methodType&quot;, it was proposed targetAttributeName and added<br>
LU&gt; this<br>
LU&gt; documentation:<br>
<br>
LU&gt; &quot;...This attribute allows the name of the attribute exposed to the using<br>
LU&gt; page to differ from the one actually used in the implementation.  For<br>
LU&gt; example, consider a composite component that contains two buttons, one<br>
LU&gt; that means &quot;submit&quot; and one that means &quot;cancel&quot;.  It is natural to want<br>
LU&gt; to declare two composite component attributes to allow these buttons to<br>
LU&gt; be customized, for example, &quot;submitAction&quot; and &quot;cancelAction&quot;.  For both<br>
LU&gt; of these buttons, the method expression should be retargeted to the<br>
<br>
LU&gt; inner button&#39;s &quot;action&quot; attribute.  This scenario would be expressed as<br>
LU&gt; follows...&quot;<br>
<br>
LU&gt; And the proposal using &quot;targetAttributeName&quot; 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>
&lt;cc:interface&gt;<br>
  &lt;cc:attribute name=&quot;submitAction&quot; targetAttributeName=&quot;action&quot; /&gt;<br>
  &lt;cc:attribute name=&quot;cancelAction&quot; targetAttributeName=&quot;action&quot; /&gt;<br>
&lt;/cc:interface&gt;<br>
<br>
&lt;cc:interface&gt;<br>
  &lt;cc:attribute name=&quot;submitAction&quot; targetAttributeName=&quot;action&quot;<br>
                method-signature=&quot;java.lang.Object action()&quot; /&gt;<br>
  &lt;cc:attribute name=&quot;cancelAction&quot; targetAttributeName=&quot;action&quot;<br>
                method-signature=&quot;java.lang.Object action()&quot; /&gt;<br>
&lt;/cc:interface&gt;<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&gt; In my opinion, the syntax using &quot;methodType&quot; is preferred. In that one, we<br>
LU&gt; are just<br>
LU&gt; defining the attribute is used for the behavioral interface ActionSource, as<br>
LU&gt; an &quot;action&quot;,<br>
LU&gt; and the method-signature declaration is not necessary anymore.<br>
<br>
I don&#39;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&#39;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&gt; Note that this syntax already works (partially) without the patch:<br>
<br>
LU&gt;   &lt;cc:attribute name=&quot;submitAction&quot; method-signature=&quot;java.lang.Object<br>
LU&gt; action()&quot;/&gt;<br>
<br>
LU&gt; I said &quot;partially&quot; because these two method signatures are valid for action:<br>
<br>
LU&gt; java.lang.Object action()<br>
LU&gt; void action()<br>
<br>
LU&gt; The problem is more clear when &quot;actionListener&quot; is considered because it has<br>
LU&gt; these two<br>
LU&gt; valid signatures (since JSF 2):<br>
<br>
LU&gt; void method(javax.faces.event.ActionEvent )<br>
LU&gt; void method()<br>
<br>
LU&gt; It is not possible to map it using method-signature, because it only allows<br>
LU&gt; one of them, but<br>
LU&gt; if we use a notation like this:<br>
<br>
LU&gt;   &lt;cc:attribute name=&quot;submitActionListener&quot; methodType=&quot;actionListener&quot;/&gt;<br>
<br>
LU&gt; The previous two signatures are assumed and problem solved. I still think<br>
LU&gt; method-signature should allow multiple ones using &#39;;&#39;, but before that (I<br>
LU&gt; want to propose a<br>
LU&gt; patch but not yet), I prefer the proposed patch using methodType.<br>
<br>
LU&gt; Suggestions are welcome.<br>
<br>
LU&gt; best regards,<br>
<br>
LU&gt; 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&#39;s Group Conference<br>
</font></blockquote></div><br>