8 Replies Latest reply on Oct 24, 2007 4:39 PM by Sergey Smirnov

    NoSuchMethodError when using JQuery and Table

    Florian Marwede Expert

      Hello again,

      I wanna use rich:jQuery for styling a table like the table in the demo (zebra style).

      I use Facelets 1.1.12, Tomahawk 1.1.6 and the newest Richfaces build (I tried also 3.1.2 GA) togehter with a Tomcat 5.5.

      My code:

      <a4j:form>
       <a4j:outputPanel ajaxRendered="true" >
       <t:htmlTag value="div" styleClass="DivTable">
       <rich:dataTable value="#{ctrl.messages}" var="message"
       rows="7" id="messagetable" width="760px"
       columnsWidth="110px,650px" rowClasses="TableRows">
       <f:facet name="header">
       <rich:columnGroup>
       <h:column>
       <h:outputText value="Date" />
       </h:column>
       <h:column>
       <h:outputText value="Message" />
       </h:column>
       </rich:columnGroup>
       </f:facet>
       <h:column>
       <h:outputText value="#{message.date}" />
       </h:column>
       <h:column>
       <h:outputText value="#{message.messageText}" />
       </h:column>
       </rich:dataTable>
       <rich:jQuery name="oddfunc" timing="immediate" selector="#messagetable tr:odd" query="addClass('odd-row')" />
       <rich:jQuery name="evenfunc" timing="immediate" selector="#messagetable tr:even" query="addClass('even-row')" />
       <rich:jQuery name="overfunc" timing="immediate" selector="#messagetable tr"
       query="mouseover(function(){jQuery(this).addClass('active-row')})"/>
       <rich:jQuery name="outfunc" timing="immediate" selector="#messagetable tr"
       query="mouseout(function(){jQuery(this).removeClass('active-row')})"/>
       </t:htmlTag>
       <t:htmlTag value="div" styleClass="DivScroller">
       <rich:datascroller for="messagetable" id="messagescroller" />
       </t:htmlTag>
       </a4j:outputPanel>
       </a4j:form>
      
      The exception is:
      
      
      java.lang.NoSuchMethodError: org.richfaces.component.util.HtmlUtil.expandIdSelector(Ljava/lang/String;Ljavax/faces/component/UIComponent;Ljavax/faces/context/FacesContext;)Ljava/lang/String;
       at org.richfaces.renderkit.JQueryRendererBase.replaceClientIds(JQueryRendererBase.java:52)
       at org.richfaces.renderkit.html.JQueryRenderer.doEncodeEnd(JQueryRenderer.java:140)
       at org.richfaces.renderkit.html.JQueryRenderer.doEncodeEnd(JQueryRenderer.java:184)
       at org.ajax4jsf.renderkit.RendererBase.encodeEnd(RendererBase.java:135)
       at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:539)
       at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:286)
       at org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:262)
       at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:284)
       at org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:262)
       at org.ajax4jsf.renderkit.html.AjaxOutputPanelRenderer.encodeChildren(AjaxOutputPanelRenderer.java:79)
       at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:527)
       at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:282)
       at org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:262)
       at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:284)
       at org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:262)
       at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:284)
       at org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:262)
       at org.richfaces.renderkit.TabRendererBase.encodeChildren(TabRendererBase.java:113)
       at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:527)
       at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:282)
       at org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:262)
       at org.richfaces.renderkit.html.TabPanelRenderer.doEncodeChildren(TabPanelRenderer.java:266)
       at org.richfaces.renderkit.html.TabPanelRenderer.doEncodeChildren(TabPanelRenderer.java:261)
       at org.ajax4jsf.renderkit.RendererBase.encodeChildren(RendererBase.java:121)
       at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:527)
       at org.apache.myfaces.shared_impl.renderkit.RendererUtils.renderChild(RendererUtils.java:414)
       at org.apache.myfaces.shared_impl.renderkit.RendererUtils.renderChildren(RendererUtils.java:400)
       at org.apache.myfaces.shared_impl.renderkit.RendererUtils.renderChild(RendererUtils.java:417)
       at org.apache.myfaces.shared_impl.renderkit.html.HtmlGridRendererBase.renderChildren(HtmlGridRendererBase.java:229)
       at org.apache.myfaces.shared_impl.renderkit.html.HtmlGridRendererBase.encodeEnd(HtmlGridRendererBase.java:101)
       at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:539)
       at org.apache.myfaces.shared_impl.renderkit.RendererUtils.renderChild(RendererUtils.java:419)
       at org.apache.myfaces.shared_impl.renderkit.html.HtmlGridRendererBase.renderChildren(HtmlGridRendererBase.java:229)
       at org.apache.myfaces.shared_impl.renderkit.html.HtmlGridRendererBase.encodeEnd(HtmlGridRendererBase.java:101)
       at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:539)
       at org.apache.myfaces.shared_impl.renderkit.RendererUtils.renderChild(RendererUtils.java:419)
       at org.apache.myfaces.shared_impl.renderkit.html.HtmlGridRendererBase.renderChildren(HtmlGridRendererBase.java:229)
       at org.apache.myfaces.shared_impl.renderkit.html.HtmlGridRendererBase.encodeEnd(HtmlGridRendererBase.java:101)
       at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:539)
       at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:252)
       at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:249)
       at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:573)
       at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
       at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:216)
       at org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:41)
       at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:132)
       at javax.faces.webapp.FacesServlet.service(FacesServlet.java:140)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
       at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
       at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
       at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:147)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
       at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
       at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
       at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
       at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
       at java.lang.Thread.run(Unknown Source)