[jboss-jira] [JBoss JIRA] (AS7-2825) #{foo[bar](baz)} fails with javax.el.MethodNotFoundException: ... action="#{p1[p2](p3)}": Method not found
Remy Maucherat (Commented) (JIRA)
jira-events at lists.jboss.org
Tue Nov 29 09:02:40 EST 2011
[ https://issues.jboss.org/browse/AS7-2825?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12646322#comment-12646322 ]
Remy Maucherat commented on AS7-2825:
-------------------------------------
It is possible this is a fix in javax.el.BeanELResolver, which Tomcat is liberally hacking, which I do not (since these are the core API classes). Looking at the updates from the official EE code is possible.
Test war somewhere ?
> #{foo[bar](baz)} fails with javax.el.MethodNotFoundException: ... action="#{p1[p2](p3)}": Method not found
> ----------------------------------------------------------------------------------------------------------
>
> Key: AS7-2825
> URL: https://issues.jboss.org/browse/AS7-2825
> Project: Application Server 7
> Issue Type: Bug
> Components: JSF, Web
> Affects Versions: 7.0.1.Final, 7.1.0.Beta1
> Environment: Win 7 x64
> Reporter: Karsten Wutzke
> Assignee: Remy Maucherat
> Labels: el
>
> This is from the original question on stackoverflow.com:
> http://stackoverflow.com/questions/8004233/jsf-2-how-to-pass-an-action-including-an-argument-to-be-invoked-to-a-facelets-s
> As an example, this view:
> {code}
> <ui:param name="p1" value="#{myBean}" />
> <ui:param name="p2" value="submit" />
> <ui:param name="p3" value="#{myBean.toString()}" />
> <h:form>
> <h:commandButton value="submit" action="#{p1[p2](p3)}" />
> </h:form>
> {code}
> with this bean:
> {code}
> @ManagedBean
> @RequestScoped
> public class MyBean {
> public void submit(String arg) {
> System.out.println("submit with " + arg);
> }
> }
> {code}
> works fine on Tomcat 7.0.22, but on JBoss AS 7 it fails while loading the page:
> {code}javax.faces.el.MethodNotFoundException: javax.el.MethodNotFoundException: /list.xhtml @164,66 action="#{p1[p2](p3)}": Method not found: com.company.project.beans.MyBean at 67f400fb.submit()
> at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:92)
> at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
> at javax.faces.component.UICommand.broadcast(UICommand.java:315)
> at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:787)
> at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1252)
> at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81)
> at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
> at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
> at javax.faces.webapp.FacesServlet.service(FacesServlet.java:312)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
> at org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:67)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)
> at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
> at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:139)
> at org.jboss.as.web.NamingValve.invoke(NamingValve.java:57)
> at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:49)
> at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:154)
> at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
> at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
> at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362)
> at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)
> at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:667)
> at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:952)
> at java.lang.Thread.run(Unknown Source)
> Caused by: javax.el.MethodNotFoundException: /list.xhtml @164,66 action="#{p1[p2](p3)}": Method not found: com.company.project.beans.MyBean at 67f400fb.submit()
> at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:109)
> at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88)
> ... 26 more
> {code}
> Chapter 1.19 of EL spec says:
> {code}ValueSuffix ::= '.' Identifier MethodParameters?
> | '[' Expression ']' MethodParameters?
> MethodParameters ::= '(' (Expression (',' Expression )* )? ')'{code}
> So, I think that Apache EL is right. Please fix ASAP. This is often used/useful in lists where you have a DELETE button per list row.
--
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
More information about the jboss-jira
mailing list