2 Replies Latest reply on Jan 17, 2011 7:16 AM by jenesiaf

    rich:dataScroller issue

    jenesiaf

      Hi,

       

      I have a page which contains 2 buttons

      • Clear Search
      • Search

       

      Based on the search criteria data is loaded on to the rich:dataTable and the rich:dataScroller is used to browse through various records incase the number of records exceed those that can be displayed on the single page of the table.

       

      The issue I am facing is that once I move to the 2nd page using the dataScroller, on a new search the scroller doest not refresh to the 1st page. it remains on the second page though the data is correctly fetched.

       

      Here is the code snippet:

       

        <rich:dataTable value="#{orderDataModel}" var="order" id="orderList" rowClasses="oddrow, evenrow" rows="#{multipleOrderBean.rowSize}" rendered="#{multipleOrderBean.orderFlag}">

                      <f:facet name="header">

                          <rich:datascroller align="center" for="orderList" maxPages="20"

                                       id="orderTableScroller" reRender="orderTableScroller"/>

                      </f:facet>

                      <rich:spacer height="10" />

                      <rich:column width="200px">

                          <f:facet name="header">

                              <a4j:commandLink value="#{messages.placerOrderNumber}" reRender="orderList" tabindex="11">

                                  <a4j:actionparam name="sortField" value="PLACER_ORDER_NUMBER" />

                              </a4j:commandLink>

                          </f:facet>

                          <s:link action="#{singleOrderAction.getOrderDetails}">

                              <f:param name="orderId" value="#{order.orderId}" />

                              <f:param name="status" value="#{order.status}" />

                              <f:param name="statusCode" value="#{order.statusCode}" />

                              <h:outputText id="placerId"  value="#{order.placerOrderNumber}" />

                          </s:link>

           </rich:column>

      </<rich:dataTable>

       

      Can any one help me sort this issue

        • 1. rich:dataScroller issue
          ssilvert

          I've moved your question to the RichFaces discussion group.  You should be able to get better help that way.

           

          Stan

          • 2. rich:dataScroller issue
            jenesiaf

            I managed to get this sorted.

            I added a 'page' attribute in the richDataScroller and set the value to it using an EL.

            Every time I performed a New Search I re-set the value of the page to 1.

            In this way, I always displays the first page for a new search