0 Replies Latest reply on Apr 27, 2011 3:02 AM by langer123

    Find DataScroller current page



      I'm using a dataTable with a dataScroller. I've added the 'Page' atribute to my dataScroller and put getter and Setters in the bean.

      How can I check the current page a user is on in the bean?

      Do I have to manually maintain the backing bean value each time a user selects a new page, hits next, previous, etc?


      <a4j:outputPanel id="renderArea">

          <rich:dataTable id="testTable" rows="5" value="#{testBean.myList}" var="item">






      <!--- Get called when clicking on button inside renderArea --->

      <a4j:commandButton id="HIDDENRERENDER"  reRender="renderArea,PTScroll" value="+test"  style="display:none"/>



      <a4j:outputPanel id="PTScroll">


              <rich:datascroller  for="testTable" maxPages="20" renderIfSinglePage="false" page="#{testBean.myPage}" />







      public class testBean


          private int myPage = 1;



          public void initialise()






          public int getMyPage()


              return myPage;




          public void setMyPage(int page)


              this.myPage = page;