Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-2532

Pageable Views call IDataProvider.size() more than once

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Reopened
    • Major
    • Resolution: Unresolved
    • 1.4.1
    • None
    • wicket
    • None
    • All

    Description

      IDataProvider.size() is typically an expensive database operation. It is called twice in typical Pageable View scenarios although Wicket makes attempts to avoid that. In addition, the first call is premature from the application perspective because it is made while the the requested page position is not yet known.

      How to reproduce:

      Drop in the attached files into the Wicket examples application and run:

      repeaters|Paging DataView Example - builds on previous to demonstrate paging and page navigation

      Otherwise I am running against a wall with IDataProvider.size() and AbstractPageableVew because I can't find any way to get the page position at the same time when IDataProvider.size() is called. Support of paging of results of unknows size is impossible without this information. Please refer to Google search results paging - that is the kind of paging we need.

      Attachments

        1. PagingPage.java
          3 kB
          bernard
        2. ContactDataProviderTest.java
          4 kB
          bernard

        Activity

          People

            Unassigned Unassigned
            bht@actrix.gen.nz bernard
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated: