[jboss-user] [JBoss Seam] - MethodBinding with parameter containing custom el function

cdanielw do-not-reply at jboss.com
Wed Aug 8 09:16:16 EDT 2007


I?m using Seam?s neat feature where MethodBinding can have parameters. It?s absolutely great! However, I can?t seem to get it to take custom el-function as parameters. 

E.g.: 
<h:commandLink ... action="#{myBackingBean.doSomething(foo:someFunction())}"/>
Using the el function by itself works fine.

I?m running Seam 1.2.1, facelets 1.1.11, a MyFaces 1.1.6 nightly and Tomcat 5.5.23. I also tried with MyFaces 1.2.0 and Tomcat 6.0.13.

Putting a breakpoint in MethodExpressionHelper.findParamTypes():
* With JSF 1.1, the ELContext is facelets LegacyELContext, and its EmptyFunctionMapper will obviously not find my functions.
* With JSF 1.2, the FunctionMapper is null.

Here is the exception being thrown in the JSF 1.1 version:
javax.faces.el.EvaluationException: /test.xhtml @24,97 action="#{ myBackingBean. doSomething (foo:someFunction())}": 
  | Function ' foo:someFunction ' not found
  |     at com.sun.facelets.el.LegacyMethodBinding.invoke(LegacyMethodBinding.java:73)
  |     at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:61)
  |     at javax.faces.component.UICommand.broadcast(UICommand.java:109)
  | etc.
I think the root cause of the exception has been lost somewhere on the way. My guess is that it comes from ExpressionBuilder.visit().

Am I doing something wrong, or isn?t this supported? It would be a great feature to have!


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4072013#4072013

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4072013



More information about the jboss-user mailing list