5 Replies Latest reply on Jan 25, 2011 1:15 AM by Harish Ashwathnarayan

    Pagination using <rich:datascroller> does not work.

    Harish Ashwathnarayan Newbie

      Hi,

      I'm at the begining stage of learning Rich Faces. I desparately need help.

       

      I have a search result page, I'm using <rich:datascroller> for pagination.

      I have set the maxPages to 10. When I goto any other page like page 2 or 3 or 4 and now suppose I'm in the page number 2 of the search results.

       

      When I click on Search again with some other search criteria, it does not take me to the first page of this search results, I still see the 2 page of the current search results.

      My question is for every search it should show the user the first search page of the results. Please help me with this.

      I have included this piece of code below.

       

      My search.jsp has the search button, when i hit this I include the search result page.

      search.jsp

      [code]

       

      <h:commandButton id="SearchSimple" value="Search" action="#{searchBean.simpleSearch}" tabindex="8" type="submit">
          <a4j:support status="progress_bar" event="onclick" reRender="includeGrid, searchResultsPanel"></a4j:support>
      </h:commandButton>

      <a4j:include id="includeGrid" viewId="searchResult.jsp" layout="block" />

      [/code]

       

      searchResult.jsp

      [code]

      <rich:datascroller boundaryControls="auto" renderIfSinglePage="false"
      fastControls="auto" stepControls="hide" status="progress_bar"
      for="searchResults" maxPages="10" id="pageNav" align="right" >
      .
      .
      .
      </rich:datascroller>

      [/code]

       

      Please Help!!!

       

      Thanks.