Hi<br><br>Yesterday I attached a patch for this issue:<br><br><a href="https://javaserverfaces-spec-public.dev.java.net/issues/show_bug.cgi?id=859">https://javaserverfaces-spec-public.dev.java.net/issues/show_bug.cgi?id=859</a><br>
<br>and then Ed Burns propose another similar one, but filling the gaps in <br>documentation and integration with automated tests (That's cool!).<br><br>Instead call it "methodType", it was proposed targetAttributeName and added this<br>
documentation:<br><br>"...This attribute allows the name of the attribute exposed to the using<br>page to differ from the one actually used in the implementation. For<br>example, consider a composite component that contains two buttons, one<br>
that means "submit" and one that means "cancel". It is natural to want<br>to declare two composite component attributes to allow these buttons to<br>be customized, for example, "submitAction" and "cancelAction". For both<br>
of these buttons, the method expression should be retargeted to the<br>inner button's "action" attribute. This scenario would be expressed as<br>follows..."<br><br>I see that from other point of view. I think that the attribute proposed indicates<br>
the attribute will be "consumed" as an method expression of type "action".<br><br>The proposal using "methodType" looks like this in the test app:<br><br> <cc:attribute name="submitAction" targets="submitButton" methodType="action"/><br>
<cc:attribute name="cancelAction" targets="cancelButton" methodType="action"/><br><br>But the intention including the patch on 755 (allow #{cc.attrs.action}) is this<br>should looks like this (I'm trying to keep them separate to prevent confusions):<br>
<br> <cc:attribute name="submitAction" methodType="action"/><br> <cc:attribute name="cancelAction" methodType="action"/><br><br>And the proposal using "targetAttributeName" looks like this:<br>
<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><br>In my opinion, the syntax using "methodType" is preferred. In that one, we are just<br>defining the attribute is used for the behavioral interface ActionSource, as an "action",<br>
and the method-signature declaration is not necessary anymore.<br><br>Note that this syntax already works (partially) without the patch:<br><br> <cc:attribute name="submitAction" method-signature="java.lang.Object action()"/><br>
<br>I said "partially" because these two method signatures are valid for action:<br><br>java.lang.Object action()<br>void action()<br><br>The problem is more clear when "actionListener" is considered because it has these two<br>
valid signatures (since JSF 2):<br><br>void method(javax.faces.event.ActionEvent )<br>void method()<br><br>It is not possible to map it using method-signature, because it only allows one of them, but<br>if we use a notation like this:<br>
<br> <cc:attribute name="submitActionListener" methodType="actionListener"/><br><br>The previous two signatures are assumed and problem solved. I still think <br>method-signature should allow multiple ones using ';', but before that (I want to propose a<br>
patch but not yet), I prefer the proposed patch using methodType.<br><br>Suggestions are welcome.<br><br>best regards,<br><br>Leonardo Uribe <br><br><br>