7 Replies Latest reply on Feb 21, 2008 11:03 AM by Mikael Andersson

    rich:scrollableDataTable problem with scroll

    Piotr Pietrzak Newbie

      When I use rich:scrollableDataTable on my page it works great but when I scroll to the bottom of this page(and rich:scrollableDataTable fetch data from server) i get strange error:


      12:08:32,109 ERROR (ExceptionFilter) handling uncaught exception
      javax.servlet.ServletException: Servlet execution threw an exception
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:313)
              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.web.MultipartFilter.doFilter(MultipartFilter.java:85)
              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
              at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
              at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
              at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
              at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
              at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
              at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
              at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
              at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
              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.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
              at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
              at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
              at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
              at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
              at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
              at java.lang.Thread.run(Unknown Source)
      Caused by: java.lang.NoClassDefFoundError: org/apache/commons/beanutils/PropertyUtils
              at org.ajax4jsf.javascript.ScriptUtils.toScript(ScriptUtils.java:114)
              at org.ajax4jsf.renderkit.AJAXDataSerializer.asString(AJAXDataSerializer.java:40)
              at org.ajax4jsf.renderkit.AjaxRendererUtils.encodeAreas(AjaxRendererUtils.java:792)
              at org.ajax4jsf.renderkit.AjaxContainerRenderer.encodeAjax(AjaxContainerRenderer.java:124)
              at org.ajax4jsf.component.AjaxViewRoot.encodeAjax(AjaxViewRoot.java:553)
              at org.ajax4jsf.component.AjaxViewRoot$4.invokeRoot(AjaxViewRoot.java:384)
              at org.ajax4jsf.context.JsfOneOneInvoker.invokeOnRegionOrRoot(JsfOneOneInvoker.java:56)
              at org.ajax4jsf.context.AjaxContextImpl.invokeOnRegionOrRoot(AjaxContextImpl.java:170)
              at org.ajax4jsf.component.AjaxViewRoot.encodeChildren(AjaxViewRoot.java:401)
              at javax.faces.component.UIComponent.encodeAll(UIComponent.java:886)
              at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:592)
              at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
              at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:216)
              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)
              ... 36 more
      12:08:32,109 ERROR (ExceptionFilter) exception root cause
      12:08:32,620 ERROR (STDERR) 2008-02-20 12:08:32 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
      INFO: Added Library from: jar:file:/G:/java/jboss-4.2.2.GA/server/default/deploy/KontRA.ear/KontRA.war/WEB-INF/lib/jboss-seam-mail.jar!/META-INF/seam-mail.taglib.xml
      12:08:32,620 ERROR (STDERR) 2008-02-20 12:08:32 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
      INFO: Added Library from: jar:file:/G:/java/jboss-4.2.2.GA/server/default/deploy/KontRA.ear/KontRA.war/WEB-INF/lib/jboss-seam-pdf.jar!/META-INF/seam-pdf.taglib.xml
      12:08:32,630 ERROR (STDERR) 2008-02-20 12:08:32 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
      INFO: Added Library from: jar:file:/G:/java/jboss-4.2.2.GA/server/default/deploy/KontRA.ear/KontRA.war/WEB-INF/lib/jboss-seam-ui.jar!/META-INF/s.taglib.xml
      12:08:32,640 ERROR (STDERR) 2008-02-20 12:08:32 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
      INFO: Added Library from: jar:file:/G:/java/jboss-4.2.2.GA/server/default/deploy/KontRA.ear/KontRA.war/WEB-INF/lib/jsf-facelets.jar!/META-INF/jsf-core.taglib.xml
      12:08:32,650 ERROR (STDERR) 2008-02-20 12:08:32 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
      INFO: Added Library from: jar:file:/G:/java/jboss-4.2.2.GA/server/default/deploy/KontRA.ear/KontRA.war/WEB-INF/lib/jsf-facelets.jar!/META-INF/jsf-html.taglib.xml
      12:08:32,650 ERROR (STDERR) 2008-02-20 12:08:32 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
      INFO: Added Library from: jar:file:/G:/java/jboss-4.2.2.GA/server/default/deploy/KontRA.ear/KontRA.war/WEB-INF/lib/jsf-facelets.jar!/META-INF/jsf-ui.taglib.xml
      12:08:32,660 ERROR (STDERR) 2008-02-20 12:08:32 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
      INFO: Added Library from: jar:file:/G:/java/jboss-4.2.2.GA/server/default/deploy/KontRA.ear/KontRA.war/WEB-INF/lib/jsf-facelets.jar!/META-INF/jstl-core.taglib.xml
      12:08:32,660 ERROR (STDERR) 2008-02-20 12:08:32 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
      INFO: Added Library from: jar:file:/G:/java/jboss-4.2.2.GA/server/default/deploy/KontRA.ear/KontRA.war/WEB-INF/lib/jsf-facelets.jar!/META-INF/jstl-fn.taglib.xml
      12:08:32,670 ERROR (STDERR) 2008-02-20 12:08:32 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
      INFO: Added Library from: jar:file:/G:/java/jboss-4.2.2.GA/server/default/deploy/KontRA.ear/KontRA.war/WEB-INF/lib/richfaces-ui.jar!/META-INF/a4j.taglib.xml
      12:08:32,670 ERROR (STDERR) 2008-02-20 12:08:32 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
      INFO: Added Library from: jar:file:/G:/java/jboss-4.2.2.GA/server/default/deploy/KontRA.ear/KontRA.war/WEB-INF/lib/richfaces-ui.jar!/META-INF/ajax4jsf.taglib.xml
      12:08:32,680 ERROR (STDERR) 2008-02-20 12:08:32 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
      INFO: Added Library from: jar:file:/G:/java/jboss-4.2.2.GA/server/default/deploy/KontRA.ear/KontRA.war/WEB-INF/lib/richfaces-ui.jar!/META-INF/rich.taglib.xml
      12:08:32,690 ERROR (STDERR) 2008-02-20 12:08:32 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
      INFO: Added Library from: jar:file:/G:/java/jboss-4.2.2.GA/server/default/deploy/KontRA.ear/KontRA.war/WEB-INF/lib/richfaces-ui.jar!/META-INF/richfaces.taglib.xml


      Google was not as usefull as usual and i can't find solution to this error. I'm using Seam 2.0.1.GA and jboss-4.2.2.GA project was generated with seam-gen.
      When I change component to rich:dataTable it works great.

        • 1. Re: rich:scrollableDataTable problem with scroll
          Mikael Andersson Master

          Don't know what the problem could be, but in which scope is the bean backing the table?


          And do you get that exception whenever it fetches more data for the table or only when you scroll to the very end of it?


          • 2. Re: rich:scrollableDataTable problem with scroll
            Piotr Pietrzak Newbie

            Mikael Andersson wrote on Feb 20, 2008 05:03 PM:


            Don't know what the problem could be, but in which scope is the bean backing the table?

            @Scope(ScopeType.APPLICATION)
            @Name("dataTableScrollerBean")
            public class DataTableScrollerBean implements DataTableScroller{


            But it should work with Seam bean also (this is example code from richfaces). This is not a problem with lifecycle of bean because bean is working correctly (I use:
            private ArrayList<DemoInventoryItem> selectedCars
            and it just works - I mean it shows selected columns)...


            I get that exception whenever it fetches more data for the table.

            • 3. Re: rich:scrollableDataTable problem with scroll
              Mikael Andersson Master

              Hmm, strange.


              I use the scrollableDataTable with beans in session scope or long running conversations without problems.


              My working case is using Seam beans and I get the data from the backing bean (no outjection) without any issues.


              Does it work when using a normal data table paired with a datascroller?


              • 4. Re: rich:scrollableDataTable problem with scroll
                Piotr Pietrzak Newbie

                Mikael Andersson wrote on Feb 20, 2008 05:46 PM:


                Does it work when using a normal data table paired with a datascroller?


                Yes, it works with datascroller.


                Click HELP for text formatting instructions. Then edit this text and check the preview.

                • 5. Re: rich:scrollableDataTable problem with scroll
                  Mikael Andersson Master

                  You better move this question to the RichFaces forum.


                  You will find the link here http://labs.jboss.org/jbossrichfaces


                  Good luck

                  • 6. Re: rich:scrollableDataTable problem with scroll
                    Piotr Pietrzak Newbie

                    Thank You for Your help so far, but can You publish Your working code with scrollableDataTable? This is very interesting component and I want to use it in my new Seam application. I can rebuild my project to work with this component.

                    • 7. Re: rich:scrollableDataTable problem with scroll
                      Mikael Andersson Master

                      The page and class are quite big, so I'll post some snippets.



                      Backing bean, there is a fetch data action which populates the rtCache list.


                      @Name("runningTasks")
                      @Scope(ScopeType.SESSION)
                      public class RunningTasksBacking {
                      
                          private RunningTasksDAO runningTasksDao;
                          List<RunningTask> rtCache=null;
                      
                          public List<RunningTask> getRunningTasks(){
                              return rtCache;
                          }
                      
                      



                      XHTML:


                      <h:form id="runningTasksForm">
                      <rich:scrollableDataTable
                                id="taskTableScrollable"
                                rowKeyVar="rkv"
                                frozenColCount="1"
                                height="400px"
                                width="650px"
                                onRowMouseOver="this.style.backgroundColor='#F1F1F1'"
                                onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'"
                                value="#{runningTasks.runningTasks}"
                                rendered="#{not empty runningTasks.runningTasks}"
                                rows="50"
                                sortMode="single"
                                var="task">
                      
                           <ui:include src="/jsf/admin/rtv/tableCols.xhtml"/>
                      </rich:scrollableDataTable>
                      </h:form>
                      



                      The tableCols.xhtml contains normal rich:column stuff, broke that out into a separate file because the same data can be seen in a normal data table as well.


                      Hope this helps a bit.


                      - Micke