I've added example #31 (JClient JTable Using Range Paging Mode) to my not-yet-documented examples page illustrating a simple case of using Range Paging mode with a Swing JTable for efficiently paging through large numbers of rows.
The Range Paging mode offers developers an alternative strategy for paging through large numbers of database rows in a view object. Using this mode, only the current page of rows is queried from the database and kept in memory. This simple demo illustrates a basic JClient form containing an PanelEmployeesView that contains a databound JTable that shows the Employee data from the HR schema. Note that the line in the PanelEmployeesView.java's jbInit() method that calls tableEmployeesView1.setModel() has been moved to the end of the method to make sure that executes after the JTable has been added to its JScrollPane. In this way, the automatic calculation of the range size will work as expected, based on how many rows the user can see in the table. The RANGE_PAGING mode is set on the view object instance in the AppModuleImpl.java class's overridden prepareSession(...) method.
11:07:17 AM
|