aspose file tools*
The moose likes JSP and the fly likes Display Table on Page with Limited Number of Rows Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Display Table on Page with Limited Number of Rows " Watch "Display Table on Page with Limited Number of Rows " New topic
Author

Display Table on Page with Limited Number of Rows

Steve Dyke
Ranch Hand

Joined: Nov 16, 2004
Posts: 1391
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

Joined: Mar 02, 2005
Posts: 443
    
    1


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

Joined: Jan 10, 2002
Posts: 60053
    
  65

You should never fetch more data than you plan to display. The JSP FAQ puts forth some strategies.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Display Table on Page with Limited Number of Rows
 
Similar Threads
Editable table, what is right approach?
Printing records in two or more columns
Coloring Table Rows
Display table rows using JSTL with different colors based on condition
Multiple Row Records