Tapestry
  1. Tapestry
  2. TAPESTRY-2263

Add a reset() method to the Grid component to reset paging and sorting to initial defaults

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.0.10
    • Fix Version/s: 5.0.12
    • Component/s: tapestry-core
    • Labels:
      None

      Description

      I have a couple of lists with identification numbers. The lists contain entries that are displayed using a Grid. The page ShowEntries has a method onActivate(int id) to get the id from the request. A getEntries() method in that page returns the entries. When I load the page the first time via /myapp/showentries/1 these methods are invoked:
      onActivate
      getEntries
      GridDataSource.getAvailableRows
      GridDataSource.prepare (entries 0-19, objects per page is 20)
      GridDataSource.getAvailableRows (4x)
      GridDataSource.getRowValue (n times)

      on chaning to a different page of the table (the 3rd in this example)
      onActivate
      onActivate
      getEntries
      GridDataSource.getAvailableRows
      GridDataSource.prepare 40-59
      GridDataSource.getAvailableRows (4x)
      GridDataSource.getRowValue (n times)

      So far so good. Now I want to load a different list
      /myapp/showentries/2
      But the previous selected page of the table (and the sort column) is displayed instead of the first page.

      It would be nice to have a reset() method on the Grid to start the new request on the first page with a defined sort column.

        Activity

        Hide
        Howard M. Lewis Ship added a comment -

        The duplicate calls to getAvailableRows() should no longer be an issue.

        A reset() method should not be a problem.

        Show
        Howard M. Lewis Ship added a comment - The duplicate calls to getAvailableRows() should no longer be an issue. A reset() method should not be a problem.

          People

          • Assignee:
            Howard M. Lewis Ship
            Reporter:
            Jesper Zedlitz
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development