11 Replies Latest reply on Feb 22, 2011 8:32 AM by Ilya Shaikovsky

    Richfaces 4 M6 rich:jquery problem with onload

    Flávio Henrique Newbie

      Hi,

       

      I am facing this problem with rich:jquery with a plugin that I use to put a mask in a date field.

       

      GRAVE: Servlet.service() for servlet [Faces Servlet] in context with path [/RF4] threw exception [Cannot convert onload of type class java.lang.String to class org.richfaces.component.JQueryTiming] with root cause

      javax.el.ELException: Cannot convert onload of type class java.lang.String to class org.richfaces.component.JQueryTiming

                at org.apache.el.lang.ELSupport.coerceToEnum(ELSupport.java:186)

                at org.apache.el.lang.ELSupport.coerceToType(ELSupport.java:409)

                at org.apache.el.ExpressionFactoryImpl.coerceToType(ExpressionFactoryImpl.java:47)

                at com.sun.faces.facelets.tag.BeanPropertyTagRule$LiteralPropertyMetadata.applyMetadata(BeanPropertyTagRule.java:88)

                at com.sun.faces.facelets.tag.MetadataImpl.applyMetadata(MetadataImpl.java:81)

                at javax.faces.view.facelets.MetaTagHandler.setAttributes(MetaTagHandler.java:129)

                at javax.faces.view.facelets.DelegatingMetaTagHandler.setAttributes(DelegatingMetaTagHandler.java:102)

                at org.richfaces.view.facelets.html.BehaviorsAddingComponentHandlerWrapper.setAttributes(BehaviorsAddingComponentHandlerWrapper.java:115)

                at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.doNewComponentActions(ComponentTagHandlerDelegateImpl.java:402)

                at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:159)

                at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120)

                at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:98)

                at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137)

                at org.richfaces.view.facelets.html.BehaviorsAddingComponentHandlerWrapper.applyNextHandler(BehaviorsAddingComponentHandlerWrapper.java:55)

                at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:184)

                at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120)

                at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:98)

                at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137)

                at org.richfaces.view.facelets.html.BehaviorsAddingComponentHandlerWrapper.applyNextHandler(BehaviorsAddingComponentHandlerWrapper.java:55)

                at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:184)

                at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120)

                at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:98)

                at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137)

                at org.richfaces.view.facelets.html.BehaviorsAddingComponentHandlerWrapper.applyNextHandler(BehaviorsAddingComponentHandlerWrapper.java:55)

                at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:184)

                at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120)

                at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:98)

                at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137)

                at org.richfaces.view.facelets.html.BehaviorsAddingComponentHandlerWrapper.applyNextHandler(BehaviorsAddingComponentHandlerWrapper.java:55)

                at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:184)

                at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120)

                at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:98)

                at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137)

                at org.richfaces.view.facelets.html.BehaviorsAddingComponentHandlerWrapper.applyNextHandler(BehaviorsAddingComponentHandlerWrapper.java:55)

                at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:184)

                at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120)

                at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137)

                at org.richfaces.view.facelets.html.BehaviorsAddingComponentHandlerWrapper.applyNextHandler(BehaviorsAddingComponentHandlerWrapper.java:55)

                at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:184)

                at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120)

                at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:98)

                at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137)

                at org.richfaces.view.facelets.html.BehaviorsAddingComponentHandlerWrapper.applyNextHandler(BehaviorsAddingComponentHandlerWrapper.java:55)

                at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:184)

                at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120)

                at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137)

                at org.richfaces.view.facelets.html.BehaviorsAddingComponentHandlerWrapper.applyNextHandler(BehaviorsAddingComponentHandlerWrapper.java:55)

                at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:184)

                at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120)

                at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:98)

                at com.sun.faces.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:93)

                at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:98)

                at com.sun.faces.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:82)

                at com.sun.faces.facelets.impl.DefaultFacelet.apply(DefaultFacelet.java:152)

                at com.sun.faces.application.view.FaceletViewHandlingStrategy.buildView(FaceletViewHandlingStrategy.java:744)

                at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:100)

                at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)

                at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)

                at javax.faces.webapp.FacesServlet.service(FacesServlet.java:313)

                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:306)

                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)

                at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)

                at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)

                at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)

                at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)

                at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:541)

                at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)

                at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:383)

                at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:243)

                at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:188)

                at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:166)

                at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:288)

                at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)

                at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

                at java.lang.Thread.run(Unknown Source)

       

       

      Here is my code:

      (...)

      <h:form>

                <h:outputScript name="jquery.maskedinput-1.2.2.min.js" library="javascript" target="head" />

      (...)

      <h:inputText id="idDataCasamento" label="Data de Casamento" value="#{meuMB.pessoaSelecionada.dataCasamento}" required="true">

                <f:convertDateTime pattern="dd/MM/yyyy" timeZone="America/Sao_Paulo" type="date" />

                <rich:jQuery selector="#idDataCasamento" query="mask('99/99/9999')" timing="onload"  />

      </h:inputText>

       

       

      This code worked agains 3.X branch.