7 Replies Latest reply on Aug 23, 2007 8:19 AM by mpulse mpulse

    Datascroller "reRender"

    mpulse mpulse Newbie


      I'm using a datascroller with a table and I'd like to know if it's possible to reRender the datascroller so I want to have focus on the first page when I reRender the table


      -we have 5 pages on the datascroller and the focus is on the fifth
      -we rerender the table (reRender the panel which contains the table and datascroller)
      -the table have now just 4 pages but the datascroller is always on the fifth and we saw nothing in the table, we must click on last button on the datascroller to see something.

      any ideas?


        • 1. Re: Datascroller
          Ilya Shaikovsky Master

          Wha is your RF version?

          • 2. Re: Datascroller
            mpulse mpulse Newbie

            Sorry RF version is 3.0.1

            • 3. Re: Datascroller
              mpulse mpulse Newbie

              i'd like to add something when we reRender the table and table have just 4 pages is normal because it's for filtered the table the problem is the focus on the page's number on the datascroller stay on its last position .

              • 4. Re: Datascroller
                Ilya Shaikovsky Master

                please update to 3.1.0 GA. The bugs very similar to your case was fixed till 3.0.1 release.

                • 5. Re: Datascroller
                  kewldude Newbie

                  Im not sure if this is the same issue that I've encountered with the scroller, but my workaround is by calling

                  table.setFirst(0);//sets the scroller to 1st page

                  where table is declared as:
                  UIData table

                  and you have to have a binding of your table in order to call the setFirst method.

                  • 6. Re: Datascroller
                    mpulse mpulse Newbie

                    the code is :

                    for the datatable

                    <rich:panel id="listmessage">
                     <f:facet name="header">Listes des messages</f:facet>
                     <h:outputText value="No messages to display" rendered="#{messageList.rowCount==0}"/>
                     <rich:datascroller stepControls="auto" id="datascroller" for="msgList" maxPages="20"/>
                     <rich:spacer height="15"/>
                     <rich:dataTable id="msgList" rows="2" var="msg" value="#{messageList}"
                     cellpadding="0" cellspacing="0">

                    code wich reRender the panel

                    <rich:toolBarGroup location="right">
                     <h:form id="searchAll">
                     <h:inputText styleClass="barsearch" id="searchAlltext" value="#{search.all}"/>
                     <a4j:commandButton refresh="listmessage,datascroller"
                    reRender="listmessage,datascroller" value="Search" styleClass="configButton" />

                    • 7. Re: Datascroller
                      mpulse mpulse Newbie

                      no idea ? I don't understand how use

                      >> table.setFirst(0);//sets the scroller to 1st page <<