1 Reply Latest reply on Apr 4, 2013 4:28 PM by Radim Hanus

    how to change/skip the default numbers for richfaces dataScroller

    Mahesh Bonagiri Newbie

      Hi,

       

      Can any one explain how to skip  the default numbers coming with richfaces dataScroller ? Is there any way to replace the default numbers with some textbox shown below.

       

      scroller.png

      Thanks in Advance,

      Mahesh.

        • 1. Re: how to change/skip the default numbers for richfaces dataScroller
          Radim Hanus Expert

          count of table rows may be defined by attribute row of both rich:datatable and rich:extendedDataTable

          if you want to customize rich:dataScroller of a "rich" table make use of predefined facets:

          <rich:dataScroller for="theTable" maxPages="10" fastStep="50" page="#{myBean.page}" render="theTable">

                                                            <f:facet name="first">#{labels.first}</f:facet>

                                                            <f:facet name="last">#{labels.last}</f:facet>

                                                            <f:facet name="fastForward">+50</f:facet>

                                                            <f:facet name="fastRewind">-50</f:facet>

                                                            <f:facet name="next">+1</f:facet>

                                                            <f:facet name="previous">-1</f:facet>

          </rich:dataScroller>

          your picture is a bit complicated but can be designed like this:

          <a4j:outputPanel id="customScroller" ...>

                                                  <rich:dataScroller for="theTable" ...>

                                                                 <f:facet name="first">#{labels.first}</f:facet>

                    ...

            </rich:dataScroller>

                                                  <h:inputText value="#{myBean.currentPage}">

            <h:outputText value="of #{myBean.lastPage} pages">

          </a4j:outputPanel>