Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

AJAx and Huge tables

 
Dharmesh Chheda
Ranch Hand
Posts: 204
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I have a huge table to display which might have around 500-1000 rows based on certain criteria which is based on what the user enters.

My servlet is returning an XML back and I am using the DOM api to navigate through the XML and create dynamic rows for the table.

the problem is that while rendering the page, i.e. creating the rows, my browser blocks user access for the time it is creating the rows and displays all the records at once ..

Is it possible to make each row visible as it is bein added to the table?...

any help will be appreciated.

Me using Java
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65110
89
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One idea: since you are using Java on the back-end, instead of returning XML, return the pre-formatted table markup. This would be easy to do with a JSP.

That would eliminate all the client-side processing necessary to digest the XML and build the corresponding DOM.

This is how I am handling this exact situation in a project I am working on now.
 
Yasir Bajwa
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I had a similar problem .. i had to display 10000 records, so I built a 'scrolling table' control. I used tables as 'pages', so I would set a page size (e.g. 25 rows) and return a table containing it. The control just appends a bunch of tables together, but to the user it looks like one table. it fetches 'pages' based on scroll position.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic