4 Replies Latest reply on Jul 7, 2008 1:37 PM by martinjozef

    Control multiple datascrollers on a page


      Here is an example of my use case

      <!-- the following is embedded in a <rich:tab> ajax enebled -->
      <rich:dataGrid >
       <!-- togglePanel in here and other stuff -->
      <rich:dataTable rows="5" >
       <h:inputText />
       <rich:calendar />
       <!-- lot's of input and about 8 columns -->
       <f:facet name="footer">
       <rich:datascroller id="scroller" align="center" ajaxSingle="false" />

      When i use the scroller in any of the generated tables
      and then transition between TABS all of the datascrollers jump to the position of the last used scroller.

      This is bad since some scrollers get position index that is out of bound. Anyway each table should retains it's own position and not synchronize to a request value that all scrollers share.

      How can i ensure that each datatable rendered on my TAB retains it's own scroll index when moving from tab to tab?
      Or at least how to reset every table to come back to position one?

      Could this possibly be a bug that i should report, or maybe it's a known limitation for datascrollers?

        • 1. Re: Control multiple datascrollers on a page

          Let me also share with you how the page looks like by adding this picture link

          I personally like to have a clear visual picture of the use case.

          • 2. Re: Control multiple datascrollers on a page

            I am working with 3.1.4 GA version of Rich Faces as i cannot update to any later release due to apache myfaces 1.2.3 incompatibilities.
            So i cannot even check if this misbehavior is fixed in the latest releases.

            • 3. Re: Control multiple datascrollers on a page

              This is my response from an advice that ilya_shaikovsky gave me.

              So i modified my business bean like this

              public class PmPropertyClass implements Serializable{
               private static final long serialVersionUID = -3383612935141196217L;
               private String propertyName;
               private BigDecimal value;
               private List<PmPropertyItem> items;
               private Extension extension;
               private boolean selected;
               private int index=0;

              The index variable is for the scroller page attribute

              <f:facet name="footer">
               <rich:datascroller id="scroller" page="#{propertyClass.index}" align="center" ajaxSingle="false" />

              However the attribute binding has no effect at all.
              the setter and getter for index does not get called at anytime from the datascroller while navigating.

              Can it be that the page attribute is not functional in 3.1.4 GA release ?

              • 4. Re: Control multiple datascrollers on a page

                my Latest discovery on this topic is that multiple datascrollers still do not work as expected on 3.2.0SR1. I can see that there was work done on them since 3.1.4 but not to an extent that would fulfill our usecase illustrated on the image i posted earlier.
                i get an message like this :

                UIDatascrolle W org.richfaces.component.UIDatascroller setupFirstRowValue Datascroller appTabForm:propertyGrid:propertyItemsTable:-1:j_id212: The requested page #0 isn't found in the model containing 1 pages. Paging is reset to page #1