[
https://issues.apache.org/jira/browse/MYFACES-3251?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13072671#comment-13072671
]
Leonardo Uribe commented on MYFACES-3251:
-----------------------------------------
It seems mojarra guys finally applied the patch sent by myself long time ago
about resolve #{cc.attrs.action}. I never thought they will apply it on
2.0.x/2.1.x branches, because this is not documented anywhere on the spec.
The good news is the alternative using "targets" property works on MyFaces as
discussed previously on the EG:
<composite:interface>
<composite:attribute name="action" required="true"
method-signature="java.lang.Object action()" targets="button"/>
<composite:attribute name="value" required="true" />
</composite:interface>
<composite:implementation>
<h:commandButton id="button" value="#{cc.attrs.value}"
styleClass="justificationForMyExistence" />
</composite:implementation>
In theory, in JSF 2.1 a new attribute on <cc:attribute> was added called
targetAttributeName to complete the solution using "targets". But I never
ported the other alternative to myfaces, because both algorithm are very
different in this part.
The big problem is how to deal when nested EL expressions are used. It is not
simple, because you have to "chain" the expressions.
This issue is not considered a bug, instead it is an improvement proposed from
MyFaces side.
> composite component attributes with @method-signature declared should carry
> through as MethodExpressions, but do not
> --------------------------------------------------------------------------------------------------------------------
>
> Key: MYFACES-3251
> URL: https://issues.apache.org/jira/browse/MYFACES-3251
> Project: MyFaces Core
> Issue Type: Bug
> Affects Versions: 2.1.2-SNAPSHOT
> Reporter: Matt Benson
> Attachments: MYFACES-3251.tar.gz
>
>
> for this reason e.g. a cc cannot propagate an action attribute to an inner
> h:commandButton.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira