Skip navigation links

Package QVGrid

QuickView Grid (QVGrid) The QuickView Grid utility class is a BBj custom object that implements grid paging for SQL based queries.

See: Description

Package QVGrid Description

QuickView Grid (QVGrid) The QuickView Grid utility class is a BBj custom object that implements grid paging for SQL based queries. It handles the vertical scrolling through the result set and coordination with user actions to load at most the number of visible grid rows at any one time. This reduces the load that the grid has to manage, thus increasing display speed, especially for larger data sets. The main program makes the SQL (JDBC) connection and issues the SELECT command to generate the initial SQL ResultSet object that is then used to populate the new BASIS Components ResultSet (BCRS). The BCRS is modelled closely after the Java SQL ResultSet, but is 0-based and does not require the connection to stay active. The developer has the choice of letting the result set metadata be automatically built from the SQL result set or setting the metadata specifically, including custom attributes picked up by the QVGrid using helper methods found in the BCRS class. The prepared BCRS object is registered with the QVGrid object. The QVGrid uses a BBjStandardGrid and provides all non-editing related BBj grid methods, either handling the action itself or relaying it to the underlying BBj grid. There is a provision for certain "shared" actions, such as selecting a grid row, that is handled by the QVGrid first and then relayed as a "process event" to the main program. This allows the QVGrid to be used as an alternative to the BBjStandardGrid. The QVGrid also offers a "RowListener" interface, that when implemented and registered with the QVGrid object, allows for the main program to interact when the data rows are being processed on their way to the grid. This can be used to set particular grid row and/or cell attributes based on the data, or whether the data row should be included in the grid at all. An accompanying test program under utils/qvgrid/qvgridtest.bbj, is the best source for a practical example of using the new class.
Since:
BBj 16.00
Skip navigation links