Reputation: 95
I need to display the log entries from a database. Of course the log data is huge, so I have to show the results on several pages, and that **without** getting **all** the log data at once, but as the user navigates through the pages.
I know about DisplayTag and TableTags, but it seems to me that they both fetch all the data before applying pagination.
Before I start developing my own JSP tag, does anyone know of a 3rd party solution for this problem?
Thanks,
Marius
Upvotes: 3
Views: 7231
Reputation: 11371
About DisplayTag: it does support Value List design pattern.
Upvotes: 3
Reputation: 430
Inside your JSP is not really the good place to solve the whole problem. In a typical layered approach, you separate the presentation (JSP here) from the data access (where you do your query).
Your displaytag/jsp tag should pass to the data access layer which page it wants (eg I need the next 30 and am on page 5), and your data access layer then takes care of a paginated query.
Upvotes: 1