When a methodexpression with arguments is invoked in a JSF composite component, Tomcat 7.0.5 EL fails to locate the right method. This works fine in Glassfish 3.0.1, so it's likely not a JSF/Facelets issue. Below testcase requires the Mojarra 2.0.3 API and Impl JAR's in /WEB-INF/lib. test.xhtml ---------------------------------------- <!DOCTYPE html> <html lang="en" xmlns:h="http://java.sun.com/jsf/html" xmlns:cc="http://java.sun.com/jsf/composite/components"> <h:head> <title>Test</title> </h:head> <h:body> <h1>Inline components</h1> <h:form> <h:commandButton value="submit without argument" action="#{bean.submit}" /> <h:commandButton value="submit with argument" action="#{bean.submit('test')}" /> </h:form> <h1>Composite component</h1> <cc:test bean="#{bean}" /> </h:body> </html> ---------------------------------------- resources/components/test.xhtml ---------------------------------------- <!DOCTYPE html> <html lang="en" xmlns:h="http://java.sun.com/jsf/html" xmlns:cc="http://java.sun.com/jsf/composite"> <cc:interface> <cc:attribute name="bean" required="true" /> </cc:interface> <cc:implementation> <h:form> <h:commandButton value="submit without argument" action="#{cc.attrs.bean.submit}" /> <h:commandButton value="submit with argument" action="#{cc.attrs.bean.submit('test')}" /> </h:form> </cc:implementation> </html> ---------------------------------------- com.example.Bean ---------------------------------------- package com.example; import javax.faces.bean.ManagedBean; import javax.faces.bean.RequestScoped; @ManagedBean @RequestScoped public class Bean { public void submit() { System.out.println("submit"); } public void submit(String string) { System.out.println("submit with string: " + string); } } ---------------------------------------- When running on Tomcat 7.0.5, the submit with argument on a JSF composite component will submit to the method without argument. When the method without argument is outcommented in bean, a javax.el.MethodNotFoundException is been thrown. While not immediately visible in the stacktrace, under the covers Tomcat seems to be returning the wrong method for the method expression.
The Mojarra download pages are currently empty so I tested 7.0.x (trunk) with MyFaces 2.0.2 and all works as expected.
I also experience this problem. I use Tomcat 7.0.5 BETA, JSF-SUN RI 2.0.2. For me, its a message like this: javax.el.MethodNotFoundException: /resources/components/sortableColumn.xhtml @22,74 action="#{cc.attrs.model.changeOrder('test', 'test')}": Method not found: at.compax.aax2sv.model.CollectionModel@4741e072.changeOrder()
As I said, this works for me when tested with the provided test case. If this doesn't work for you, you will need to provide the simplest a test case that demonstrates this.