[ 
https://issues.apache.org/jira/browse/MYFACES-2553?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12833178#action_12833178
 ] 

Leonardo Uribe commented on MYFACES-2553:
-----------------------------------------

Testing mojarra example ajax-component/switchlistComponent.jsf

The use of the composite component is this:

              <ez:switchlist id="switchlist" selected1="#{switchlist.list1}" 
selected2="#{switchlist.list2}"
                      items1="#{switchlist.items1}" 
items2="#{switchlist.items2}"
                      move1to2="#{switchlist.move1to2}" 
move2to1="#{switchlist.move2to1}"/>

The composite component has something like this in its declaration:

<cc:attribute name="move1to2" targets="move1to2" required="true" 
method-signature="void f1(javax.faces.event.ActionEvent)" />

inside <cc:implementation> it has something like this:

<h:commandButton id="move1to2" value="&gt;&gt;" 
actionListener="#{cc.attrs.move1to2}" styleClass="switchlistButton"/>

When the page is rendered, the following message is shown below:

com.sun.faces.application.view.FaceletViewHandlingStrategy 
retargetMethodExpressions
WARNING: JSF1092: Composite Component: switchlist.xhtml, library: switchlist : 
Unnecessary specification of the 'targets' attribute for composite attribute 
'move2to1'.  The 'targets' attribute is only necessary when the composite 
attribute is named 'action', 'actionListener', 'validator', or 
'valueChangeListener'.

Checking myfaces, the attribute is retarget to h:commandButton, but on 
attribute "move1to2". 

To make this work, the attribute must not be retarget, but it is not very clear 
what should happen instead. It seems according to the warning there is some 
missing undocumented detail on 
ViewDeclarationLanguage.retargetMethodExpressions that do "something".

Suggestions are welcome.

> Handle MethodExpressions on <composite:attribute> correctly
> -----------------------------------------------------------
>
>                 Key: MYFACES-2553
>                 URL: https://issues.apache.org/jira/browse/MYFACES-2553
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: JSR-314
>    Affects Versions: 2.0.0-beta-2
>            Reporter: Jakob Korherr
>            Assignee: Jakob Korherr
>
> There are currently problems when <composite:attribute> refers to a 
> MethodExpression.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to