The implementation should satisfy the following requirements:
- support viewing all the logged events (in a DB) with provision for specifying the number of rows per page to show in a data grid of event records.
- support pagination.
- support sorting on columns like event time, id, type etc.
- support exporting events data to CSV, excel etc formats.
- change row color to highlight rows based on severity of events.
- enable viewing live events instantaneously as they occur.
The first 5 requirements are easily met by Displaytag, an excellent JSP tag library for displaying data grids. We can also enable AJAX support for displaytag data grid pagination and sorting using ajaxtags library.
We did not like the live grid type views (which may be better suited to the search examples) for our requirement as we believe the pagination with Ajax support is more appealing and common experience for users.
The last requirement is met by DWR 2.0 (which as of this writing is still being developed and the current release is 2.0 RC2). DWR 2.0 has a new feature called Reverse AJAX, which enables pushing the data from server to browser client, asynchronously.
So, we have two data grids in our UI;
- First data grid, displays the existing event records from the DB.