0 Replies Latest reply on Jul 27, 2007 5:30 AM by Xinhua Gu

    question about binding method

    Xinhua Gu Newbie

      hello all ,

      i want to use binding method for a modalPanel so that i can control its appearance. The following is my code

      <rich:modalPanel ......... binding="#{mypanel.panel}" />
      


      backing bean

      public class Mypanel{
       HtmlModalPanel panel;
      
       public HtmlModalPanel getPanel() {
       if(panel!=null)
       panel.setZindex(2000);
       return panel;
       }
      
       public void setPanel(HtmlModalPanel panel) {
       this.panel = panel;
       }
      


      And class Mypanel is registered in face-config.xml as "mypanel"
       <managed-bean>
       <managed-bean-name>mypanel</managed-bean-name>
       <managed-bean-class>
       xxx.xxxx.xxxx.Mypanel
       </managed-bean-class>
       <managed-bean-scope>session</managed-bean-scope>
       </managed-bean>
      
      


      Unfortunately, i always recieve an exception like :

      javax.faces.FacesException: javax.el.ELException: /login.xhtml @125,121 binding="#{mypanel.panel}": java.lang.IllegalArgumentException: argument type mismatch
       at com.sun.faces.application.ApplicationImpl.createComponent(ApplicationImpl.java:216)
       at org.jboss.seam.jsf.SeamApplication.createComponent(SeamApplication.java:325)
       at com.sun.facelets.tag.jsf.ComponentHandler.createComponent(ComponentHandler.java:224)
       at com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:139)
       at com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
       at com.sun.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:49)
       at com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
       at com.sun.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:25)
       at com.sun.facelets.impl.DefaultFacelet.apply(DefaultFacelet.java:95)
       at com.sun.facelets.FaceletViewHandler.buildView(FaceletViewHandler.java:509)
       at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:552)
       at org.ajax4jsf.framework.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
       at org.ajax4jsf.framework.ajax.AjaxViewHandler.renderView(AjaxViewHandler.java:233)
       at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
       at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
       at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
       at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
       at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:687)
       at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:469)
       at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:403)
       at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
       at org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:699)
       at org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:670)
       at org.apache.jsp.index_jsp._jspService(index_jsp.java:59)
       at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
       at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:387)
       at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
       at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
       at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
       at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:63)
       at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
       at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:87)
       at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
       at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:63)
       at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
       at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:46)
       at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
       at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:127)
       at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:277)
       at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:40)
       at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
       at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:140)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
       at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
       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:230)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
       at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
       at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
       at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
       at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
       at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
       at java.lang.Thread.run(Thread.java:595)
      Caused by: javax.el.ELException: /login.xhtml @125,121 binding="#{mypanel.panel}": java.lang.IllegalArgumentException: argument type mismatch
       at com.sun.facelets.el.TagValueExpression.setValue(TagValueExpression.java:101)
       at com.sun.faces.application.ApplicationImpl.createComponent(ApplicationImpl.java:213)
       ... 65 more
      Caused by: java.lang.IllegalArgumentException: argument type mismatch
       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:585)
       at javax.el.BeanELResolver.setValue(BeanELResolver.java:108)
       at javax.el.CompositeELResolver.setValue(CompositeELResolver.java:68)
       at com.sun.faces.el.FacesCompositeELResolver.setValue(FacesCompositeELResolver.java:93)
       at org.jboss.el.parser.AstPropertySuffix.setValue(AstPropertySuffix.java:73)
       at org.jboss.el.parser.AstValue.setValue(AstValue.java:84)
       at org.jboss.el.ValueExpressionImpl.setValue(ValueExpressionImpl.java:249)
       at com.sun.facelets.el.TagValueExpression.setValue(TagValueExpression.java:93)
       ... 66 more
      


      ps: i use seam2.0Beta1

      can anyone help?
      many many thanks!