• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Display Table on Page with Limited Number of Rows

 
Ranch Hand
Posts: 2206
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Ranch Hand
Posts: 479
1
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You should never fetch more data than you plan to display. The JSP FAQ puts forth some strategies.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic