14 Replies Latest reply on Nov 5, 2007 8:39 PM by Jason Gould

    rich:datascroller is jumping between selected page on page r

    Markus Kühle Newbie

      I have a strange behaviour when refreshing the page with -F5 or hitting next or previous datascroller button: sometimes the selected pages jumps randomly from one to another page (e.g. from 5 to 9 or 9 to 2)

      Test environment:
      Facelets 1.1.12,
      JSF RI 1.1 (same behaviour with MyFaces 1.1.5)
      RichFaces 3.1.0 (same behaviour with 3.1.1 latest snapshot)
      JDK: 1.5
      Server: Tomcat 5.5.23

      The example code is very simple:
      Backing Bean to generate list:

      import java.util.ArrayList;
      import java.util.List;
      public class ListTestBB {
       public List getTestList(){
       List l = new ArrayList();
       for (int i = 0; i < 40; i++) {
       l.add("tmp" + i);
       return l;

      And output jsf (xhtml) page:
       <h:form id="helloForm">
       <rich:datascroller for="testListTable"/>
       <rich:dataTable id="testListTable"
       volumns="1" columnsWidth="150"

      Faces config:

      The normal behaviour for this litttle code snipped (datascroller and datatable) should be: after selecting e.g. page 10 and do perform a browser/page reload with -F5. The selected initial page should be the first one.
      But doing this several times the output is very strange. The selected page is jumping around.
      The same strange result is coming up when using next and previous buttons. The selected page is always a random one.

      Or the other scenario: After selecting wild some pages and hitting then the next or previous button the selected page is jumping around unpredictable.

      If you want you can download this sample in a .war and try it yourself. http://webthreads.de/FaceletsTest.war

      Or try it live online: http://www.webthreads.de/FaceletsTest/listTest.jsf
      Click randmonly on some pages: e.g. 5 then 9 then 3 then 7 and then hit F5 for refresh or hit the next/previous button to see the strange jumping around behaviour

      Does someone know the reason of thi behaviour or a solution to prevent this?

      Thank you very much!