Hi Mark,

I just got a chance to test it on the Beta release. It's still broken, with
a slightly different exception message.

javax.faces.el.MethodNotFoundException: javax.el.MethodNotFoundException:
/helloWorld.xhtml @15,85
action="#{helloWorldController.doSomething(helloWorldModel)}": Method not
found: org.wjh.experiment.jsf.helloworldcontrol...@c5122f.dosomething()

The previous attached project is still valid as a test case.

John Wu


markt-2 wrote:
> 
> On 10/06/2010 14:42, John Wu wrote:
>> 
>> Hi Mark,
>> 
>> The fix of "to derive the type directly from the value which ..." sounds
>> not
>> a solution. In a slightly more complex scenario, the fix still fails.
>> 
>> Say the method signature is "public * theMethod(TheSupperType o)" and
>> calling the method in EL like
>> "#{theClassInstance.theMethod(theDerivedTypeInstance)}", where the supper
>> type can be a supper class or an interface, your fix fails.
> 
> super has one p, not two.
> 
> I looked at the current code and the spec again. There is no need for
> any of this complexity. The exact types are defined when the method
> expression is created. I'm not sure why I was trying to derive them at
> invocation time when they were already available.
> 
> I have added a test case, modified the implementation and checked the
> new code with the EL TCK and all looks to be OK.
> 
> Mark
> 
>> 
>> Example project attached.
>> 
>> My suggestion as to the solution of resolving which method to call:
>> . Retrieve all methods of *theClassInstance*, and put them into the
>> CANDIDATES collection;
>> 
>> // Search a match by method name
>> . For each method in CANDIDATES,
>>    . if the name is not *theMethod*, remove it from CANDIDATES
>> . If CANDIDATES is empty, then NOT-FOUND;
>> . else if only one is left, then FOUND;
>> 
>> // Search a match by params count
>> . else, count the number of actual params,
>> . For each method in CANDIDATES,
>>    . if the number of formal params does not match that of actual params,
>> remove it from CANDIDATES
>>    . // Optoional, handle cases of "method has variable number of
>> arguments"
>> . If CANDIDATES is empty, then NOT-FOUND;
>> . else if only one is left, then FOUND;
>> 
>> // Search a match by param types
>> . else, evaluate all actual params;
>> . For each method in CANDIDATES,
>>    . if NOT( for-each formalParamType.isAssignableFrom(actualParamType)
>> ),
>> remove it from CANDIDATES
>>    . // Optoional, handle cases of "method has variable number of
>> arguments"
>> . If CANDIDATES is empty, then NOT-FOUND;
>> . else if only one is left, then FOUND;
>> 
>> . else, AMBIGUOUS
>> 
>> 
>> John Wu
>> http://old.nabble.com/file/p28843317/jsf-2.0-el-2.2.testcase-v2.zip
>> jsf-2.0-el-2.2.testcase-v2.zip 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/EL-2.2-in-Tomcat-7-RC1-RC2-does-not-fully-support-method-invocation%2C-such-as-%22-%7BhelloWorldController.doSomething%28helloWorldModel%29%7D%22-tp28671969p28948402.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to