Hi

The stack trace shows it is a Tomcat EL bug. MyFaces is passing the
params properly. I would suggest to use another EL implementation to
see if it works, but first it is necessary to see if the listener
defines the parameter correctly or not. You can use the alternate
syntax with "target" attribute, instead a cc EL expression, to see if
there is a problem there.

regards,

Leonardo Uribe

2012/7/23 [email protected] <[email protected]>:
> Dear all,
>
> I am experiencing what I think is a bug with Tomcat 6.0.33 / MyFaces 2.1.7
> (I am also using CODI, but do not think this has an impact).
> I posted a question on stackoverflow but had no answer yet :
> http://stackoverflow.com/questions/11566496/passing-method-parameter-to-nested-composite-component-fails
>
>
> I have a first component wose composite:interface looks like :
>
> |<composite:interface>
>     <composite:attribute  name="onRowEditListener"  required="false"
> method-signature="void listener(org.primefaces.event.RowEditEvent)"/>
> </composite:interface>
>
> |
>
> It uses another composite component component which has a similar interface.
>
> The first level component is used this way :
>
> |<mynamespace:compo1onRowEditListener=#{bean.method}"/>
> |
>
> The nested one is used this way :
>
> |<mynamespace:compo2onRowEditListener=#{cc.attrs.onRowEditListener}"/>
> |
>
> If I insert in both controls, I got :
>
>  * in the first level control, an output like
>    org.apache.el.MethodExpressionImpl@358f0647, which looks good to me
>  * in the second (nested) level control, an output like
>    org.apache.myfaces.view.facelets.el.LocationValueExpression@ff381f45 .
>
> Raised exception looks like :
>
>
> |19/07/2012  19:39:02  fr.senat.faces.exceptions.DetailedExceptionHandler
> INFO[DetailedExceptionHandler.java:40]  [http-8080-7]  -  Stack  trace:
> javax.faces.FacesException:  Exception  while  calling broadcast on
> component:  {Component-Path  :  [Class:
> javax.faces.component.UIViewRoot,ViewId:  /editSenateur.xhtml][Class:
> javax.faces.component.html.HtmlBody,Id: j_id_5][Class:
> org.primefaces.component.layout.Layout,Id: j_id_6][Class:
> org.primefaces.component.layout.LayoutUnit,Id: j_id_v][Class:
> org.primefaces.component.outputpanel.OutputPanel,Id:
> detailCommissions][Class: javax.faces.component.html.HtmlForm,Id:
> j_id_x][Class: org.primefaces.component.tabview.TabView,Id:
> tabFonctionsInternes][Class: org.primefaces.component.tabview.Tab,Id:
> fonctionsCommissions][Class: javax.faces.component.UINamingContainer,Id:
> j_id_10][Class: javax.faces.component.UIPanel,Id:
> j_idj_id_10__f_cc_facet][Class:
> org.primefaces.component.outputpanel.OutputPanel,Id:
> panelTabViewCommissions][Class: org.primefaces.component.tabview.TabView,Id:
> tabViewCommissions][Class: org.primefaces.component.tabview.Tab,Id:
> commissionTab][Class: org.primefaces.component.panelgrid.PanelGrid,Id:
> j_id_15][Class: org.primefaces.component.row.Row,Id: j_id_1b][Class:
> org.primefaces.component.column.Column,Id: j_id_1c][Class:
> javax.faces.component.UINamingContainer,Id: j_id_1d][Class:
> javax.faces.component.UIPanel,Id: j_idj_id_1d__f_cc_facet][Class:
> org.primefaces.component.datatable.DataTable,Id: sheetFonctions]} created
> from: /resources/sen/fonctionsCommission.xhtml at line27  and  column162
>     at
> javax.faces.component.UIComponentBase.broadcast(UIComponentBase.java:430)
>     at javax.faces.component.UIData.broadcast(UIData.java:1610)
>     at javax.faces.component.UIData.broadcast(UIData.java:1596)
>     at javax.faces.component.UIData.broadcast(UIData.java:1596)
>     at javax.faces.component.UIData.broadcast(UIData.java:1596)
>     at javax.faces.component.UIViewRoot._broadcastAll(UIViewRoot.java:1023)
>     at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:286)
>     at javax.faces.component.UIViewRoot._process(UIViewRoot.java:1360)
>     at
> javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:752)
>     at
> org.apache.myfaces.lifecycle.InvokeApplicationExecutor.execute(InvokeApplicationExecutor.java:38)
>     at
> org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:170)
>     at
> org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
>     at
> org.apache.myfaces.extensions.cdi.jsf2.impl.listener.phase.CodiLifecycleWrapper.execute(CodiLifecycleWrapper.java:95)
>     at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
>     at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
>     at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>     at
> org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:357)
>     at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
>     at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>     at
> fr.senat.faces.filters.HibernateSessionConversationFilter.doFilter(HibernateSessionConversationFilter.java:76)
>     at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
>     at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>     at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
>     at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
>     at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
>     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:291)
>     at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
>     at
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)
>     at
> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
>     at java.lang.Thread.run(Thread.java:662)
> Caused  by:  org.apache.myfaces.view.facelets.el.ContextAwareELException:
> javax.el.ELException:  java.lang.IllegalArgumentException:  wrong number of
> arguments
>     at
> org.apache.myfaces.view.facelets.el.ContextAwareTagMethodExpression.invoke(ContextAwareTagMethodExpression.java:108)
>     at
> org.primefaces.component.behavior.ajax.AjaxBehaviorListenerImpl.processAjaxBehavior(AjaxBehaviorListenerImpl.java:42)
>     at
> org.primefaces.event.RowEditEvent.processListener(RowEditEvent.java:41)
>     at
> javax.faces.component.behavior.BehaviorBase.broadcast(BehaviorBase.java:74)
>     at
> javax.faces.component.UIComponentBase.broadcast(UIComponentBase.java:406)
>     ...  31  more
> Caused  by:  javax.el.ELException:  java.lang.IllegalArgumentException:
> wrong number of arguments
>     at org.apache.el.parser.AstValue.invoke(AstValue.java:195)
>     at
> org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
>     at
> org.apache.myfaces.view.facelets.el.ValueExpressionMethodExpression.invoke(ValueExpressionMethodExpression.java:68)
>     at
> org.apache.myfaces.view.facelets.el.ContextAwareTagMethodExpression.invoke(ContextAwareTagMethodExpression.java:96)
>     ...  35  more
> Caused  by:  java.lang.IllegalArgumentException:  wrong number of arguments
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native  Method)
>     at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>     at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>     at java.lang.reflect.Method.invoke(Method.java:597)
>     at org.apache.el.parser.AstValue.invoke(AstValue.java:191)
>     ...  38  more
>
> |
>
> It looks like the method is properly passed to the first control, but that
> the EL expression gets a bullet when passed to the second...
>
> Thanks in advance for your help.
>
> Ludovic
>
>
>
> |
> | AVANT D'IMPRIMER, PENSEZ A L'ENVIRONNEMENT.
> |

Reply via email to