ICEfaces
  1. ICEfaces
  2. ICE-9386

ClassCastException when using datatable's lazy loading and preset filter values

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.1, 3.3
    • Fix Version/s: 4.0.BETA, EE-3.3.0.GA_P02, 4.0
    • Component/s: ACE-Components
    • Labels:
      None
    • Environment:
      Tomcat 7.0.41, OpenWebBeans 1.1.7, Windows 7, JDK 1.7.0_21

      Description

      When a datatable is used with lazy loading and a column's filter value is set prior to the rendering, a ClassCastException is thrown.

      A demo application is attached to the forum thread
      [http://www.icesoft.org/JForum/posts/list/0/22041.page#77558]

      {panel:title=Stacktrace}
      java.lang.ClassCastException: javax.faces.model.ListDataModel cannot be cast to org.icefaces.ace.model.table.LazyDataModel
      at org.icefaces.ace.component.datatable.DataTable.loadLazyData(DataTable.java:1441)
      at org.icefaces.ace.component.datatable.DataTableRenderer.encodeTableBody(DataTableRenderer.java:266)
      at org.icefaces.ace.component.datatable.DataTableRenderer.encodeTable(DataTableRenderer.java:234)
      at org.icefaces.ace.component.datatable.DataTableRenderer.encodeEntirety(DataTableRenderer.java:162)
      at org.icefaces.ace.component.datatable.DataTableRenderer.encodeEnd(DataTableRenderer.java:120)
      at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:881)
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1786)
      at javax.faces.render.Renderer.encodeChildren(Renderer.java:168)
      at org.icefaces.impl.renderkit.RendererWrapper.encodeChildren(RendererWrapper.java:49)
      at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:851)
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1779)
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1782)
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1782)
      at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:439)
      at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:124)
      at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:286)
      at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:120)
      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:594)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
      at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
      at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023)
      at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
      at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
      at java.lang.Thread.run(Thread.java:722)
      {panel}

        Activity

        Hide
        Nils Lundquist added a comment -

        Revision #36599
        Committed by nils.lundquist
        Moments ago
        ICE-9386 - Altered getValue to handle lazy loading + initial filtering edge case.

        Show
        Nils Lundquist added a comment - Revision #36599 Committed by nils.lundquist Moments ago ICE-9386 - Altered getValue to handle lazy loading + initial filtering edge case.
        Hide
        Arturo Zambrano added a comment -

        Backported fix to 3.3 EE maintenance branch at revision 38842.

        Show
        Arturo Zambrano added a comment - Backported fix to 3.3 EE maintenance branch at revision 38842.

          People

          • Assignee:
            Arturo Zambrano
            Reporter:
            Florian Jung
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: