File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes AJAx and Huge tables Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "AJAx and Huge tables" Watch "AJAx and Huge tables" New topic
Author

AJAx and Huge tables

Dharmesh Chheda
Ranch Hand

Joined: May 08, 2001
Posts: 204
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


regards,<br />Dharmesh Chheda
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61756
    
  67

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.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Yasir Bajwa
Greenhorn

Joined: May 02, 2007
Posts: 23
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: AJAx and Huge tables