5 Replies Latest reply on Jan 16, 2008 10:21 AM by Dimitri Tishchenko

    DataScroller Jumps

    Matt Majewski Newbie

      I have a datascroller that jumps around.

      -Click next on page 1, goes to page 2
      -Click next on page 2, stays on page 2
      -After this, the back and next buttons produce random results.
      (example go to page 5, click next, goes to page 2)

      I've seen related posts, but no solutions. Anybody solve this problem?

      Here's my code....

      <h:form>
      <rich:dataGrid id="dg_featured" value="#{featuredMatches}" var="sel" rendered="#{featured}" columns="4" elements="8" styleClass="dg" >

      ...

      <f:facet name="footer">
      <rich:datascroller pageIndexVar="pageIndex" pagesVar="pages" ignoreDupResponses="true" maxPages="4" renderIfSinglePage="false">
      </rich:datascroller>
      </f:facet>
      </rich:dataGrid>
      </h:form>

        • 1. Re: DataScroller Jumps
          Ilya Shaikovsky Master

          fill the bug in jira after you'll be able to provde simple sample in war(including libs) and attach to this bug.

          • 2. Re: DataScroller Jumps
            Dimitri Tishchenko Newbie

            Similar issue for me

            Note: I am using a keepalive for my backing bean

            <h:form id="formIndex">
             <a4j:keepAlive beanName="forums"/>
             <rich:dataTable value="#{forums.forums}"
             var="forum"
             id="dataTableForums"
             rows="20"
             >
             <h:column>
             <a4j:commandLink value="#{forum.title}"
             style="display:block;"
             />
             <h:outputText value="#{forum.description}" style="font-style:italic; display:block; padding-left:10px;"/>
             </h:column>
             </rich:dataTable>
            
             <rich:datascroller for="dataTableForums" />
            
            </h:form>
            


            any solutions?

            • 3. Re: DataScroller Jumps
              Dimitri Tishchenko Newbie

              The reason the datascroller is jumping around is that calling getFirst on the datatable is yielding random results.

              I put a println in my backing bean to see what get first would print.
              I have 5 pages with 12 items per page.
              What i'm doing here is getting the datatable and printing the output of getFirst. I'm going to click next until I reach page 5.

              first: 12
              first: 12
              first: 24
              first: 24
              first: 12
              first: 24
              first: 24
              first: 24
              first: 36
              first: 36
              first: 24
              first: 36
              first: 36
              first: 36
              first: 48

              As you can see the first value jumps around quite a bit. It is not random though. If I repeat the test this order will be repeated.




              JSF 1.0
              RichFaces 3.1.3
              java 1.4.2
              Websphere Application Server 6.0

              Thanks

              • 4. Re: DataScroller Jumps
                Ilya Shaikovsky Master

                we supposts JSF implementations of Sun and MyFaces starting from 1.1 versions.

                • 5. Re: DataScroller Jumps
                  Dimitri Tishchenko Newbie

                  Thanks for the quick reply. I really love the work you guys are doing. Hopefully we will be able to move to the new JSF version soon.