2 Replies Latest reply on May 12, 2011 2:49 AM by daniell

    Partial data (list) in <rich:dataTable>

    elisei

      Hi,

       

      I have a question to the more experienced user of this forum and of <rich:dataTable>.

       

      I want to build a <rich:dataTable> with many pages and scrolling functions. If the result deliveres for example over 100.000 or even more rows, I do not want to fetch all of them from the DB, but only those that are showed on the page (e.g. 20).

       

      How ca I do this, without creating a List with 100.000 empty elements and setting the page parameter to the current page?

       

      Somehow I do not understand the documentation, and/or how that is described there.

       

      Many thanks in advance.

       

      /Elisei

        • 1. Partial data (list) in <rich:dataTable>
          mp911de

          Hi Elisei,

          fetching that much stuff is annoying. Everyone i know is overstrained when there are more than 50 records :-)

          Anyway, the datascroller from RichFaces gets his data about list size and so on from the datatable. You could create an own proxy-component that intercepts the datascroller-calls (Some sort of MyHtmlDataTable extending by subclassing OR HtmlDataTableProxy for using HtmlDataTable as delegate). When you reach your preloaded records, you easily fire some events to your controller to get next records.

          The only problem i see is, when you want to use sorting-feature from rich:dataTable, because not all data is available for sorting.

           

          Best regards,

          Mark

          • 2. Partial data (list) in <rich:dataTable>
            daniell

            This is the same question than in http://community.jboss.org/thread/165635?tstart=0, isn't it?