[ 
https://issues.jboss.org/browse/SEAMFACES-208?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Porter resolved SEAMFACES-208.
------------------------------------

      Assignee: Jason Porter
    Resolution: Done

    
> Support for resolving no argument methods in an EL value expression
> -------------------------------------------------------------------
>
>                 Key: SEAMFACES-208
>                 URL: https://issues.jboss.org/browse/SEAMFACES-208
>             Project: Seam Faces
>          Issue Type: Feature Request
>          Components: CDI Integration
>    Affects Versions: 3.1.0.Beta2
>            Reporter: Dan Allen
>            Assignee: Jason Porter
>             Fix For: 3.1.0.Final
>
>
> The EL specification added support for resolving parameterized methods in 
> value and method expressions, with one exception. It does not support 
> resolving methods with 0 parameters. The reason is that an () used at the end 
> of a property is not acknowledged. As a result, the resolver attempts to 
> resolve the method name as a bean property.
> For example, assume we have the method:
> {code}
> public Integer count() {
>     return 1;
> }
> {code}
> If we attempt to resolve this in a value expression using:
> {code}
> #{bean.count()}
> {code}
> We can an error message "count property not found on bean"
> It works as expected if the method has at least one parameter:
> {code}
> public Integer count(Integer i) {
>     return i;
> }
> {code}
> The following expression will resolve to a value of 1.
> {code}
> #{bean.count(1)}
> {code}
> This also breaks resolving the size of a collection:
> {code}
> #{employees.size()}
> {code}
> In this case, the error is a bit strange because it tries to parse size as an 
> index.
> The root cause of all this is that the spec does not properly honor 0 
> parameters as a valid number of parameters for a parameterized methods. 
> Instead, it ignores the () and treats the expression as a property.
> Method expressions does not have this limitation since both .action and 
> .action() are equivalent expressions.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        
_______________________________________________
seam-issues mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/seam-issues

Reply via email to