6 Replies Latest reply on Apr 17, 2007 2:47 AM by Sergey Smirnov

    Reset datascroller

    Alexander Furer Newbie

      Hello
      How do i reset datascroller when i filter DB data by new criteria ?
      I have few input fileds for criteria with "Find" button on page, dataTable with datascroller.

      <a4j:commandButton type="submit" value="Find" reRender="clientsTable" id="findBtn" actionListener="#{clientsBean.resetDataScroller}"/>
      
      <rich:dataTable value="#{clientsBean.tableModel}" var="client" binding="#{clientsBean.table}" id="clientsTable" rows="16" >
      </rich:dataTable>
      

      resetDataScroller looks like this :
      public void resetDataScroller(ActionEvent event){
       table.setFirst(0);
      }


      What happens is , that if first "Find" returns 2 pages, and second "Find" returns 10 pages, i can't scroll to 3-rd page.
      Also, when i press "Find" second time, current page remains unchanged (i expect to see first page).
      Thanks