The current Datagrid implementation has a number of issues when used with big tables (read thousands of rows to display in a grid)
- Performance issues (i.e. to calculate and display number of rows)
- On change of a filter the total number of rows needs to be calculated to be displayed and to calculated to size of the needed vertical scrollbar
- Vertical scrollbar is missing
- The height of the html div-element used to render the scrollbar does exceed the limits for div-element on some browser depending on number of rows and browser type and version.
To address this issues in this project a change to the Datagrid will be implemented which introduces the concept of paging of the grid. The changed Datagrid will be limited to only show a total of 10.000 inside the scrollable area at one time. New buttons will be added to allow the navigation between these pages.
The changes of this project are planned to be included in both the 2.40 and the 2.50 branch on Openbravo.
They will be done in two separate development branches until the development and QA process is completed.
The process of converting an existing selector to the new paged datagrid is documented here
Technical Details on the implementation
- Per grid a server-side session variable will be maintained to store the 'current' backendPage.
- The client-side grid code will use relative offset (always 0<relativeOffset<backendPageSize)
- The client-side core grid logic itself does not know about the paging
- The data provider (DataGrid servlet or selector servlet) translates the relative offsets into absolute offsets (by adding backendPageSize*backendPage)
- The client side request to change the backendPage will be piggy-backed onto a normal DATA request to avoid an additional HTTP round-trip.
- Generated window: DONE
- Selectors: STARTED