Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Display Table on Page with Limited Number of Rows

 
Steve Dyke
Ranch Hand
Posts: 1619
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think I have inquired about this some time back but never got very far.

I would like some direction on the best way to display large number of records in a table. The data is gathered remotely, placed into an array, then jstl builds the table for display. The array is built in seconds but the table takes a while to build and display. I figure the correct thing to do is limit the number of rows the jstl has to loop through.

Is this correct? If so what is the best approach?
 
Rajkamal Pillai
Ranch Hand
Posts: 445
1
Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hello Steve,

I am able to think of a few available options. Well here they are :-

1. Fetch the rows in batches and sent those batches of rows to the client.
2. Fetch as above (in batches) but send all of them (to the client) in one go (could take time in the display) and display them on the page in a paginated manner.
3. Fetch as above (in batches) but send a few batches in an optimistic manner and raise a new request if a different batch/page is being requested for.
4. Use a taglib e.g. display-tag which does the necessary processing and help with the pagination too in a configurable manner.

Cheers,
Raj.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64692
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You should never fetch more data than you plan to display. The JSP FAQ puts forth some strategies.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic