Actually, this isn’t true.  It all depends on how you handle the list.  All displaytag wants every time around is a List object (or whatever else it accepts).  It’s entirely up to you how and when that list is populated.  For example, you could do the db query, push the list into the user session, then just use that each time the user does a sort or page move.  The really important thing is that displaytag DOES NOT CARE where its list comes from.  All it wants is its data.  It’s up to you where that list comes from.

 

Now, the solution Ricardo is talking about is a good one because it doesn’t require you to query the db and cache 50K records at a time, which in terms of scalability in an application with any decent number of users will probably be necessary.  I haven’t done it myself, but I’ve seen it discussed on this list so do a search for PaginatedList in the list archive.  What you really want to do is a lazy fetch on the database, so that you’re really only retrieving the 15 records for display each time (this causes trouble with sorting within displaytag, since it doesn’t have all of the items to sort, meaning that you need to actually do an order by within the SQL; that’s probably OK though, since the database is better at that sort of thing, but it’s another challenge to deal with).  Doing a lot of small queries like this has its own performance penalties (with one big fetch you only have one round trip to the server), but storing 50K records per user is a real resource hog!

 

Rick Herrick

[EMAIL PROTECTED]

 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ricardo Tercero Lozano
Sent: Thursday, August 24, 2006 3:24 AM
To: displaytag-user@lists.sourceforge.net
Subject: Re: [displaytag-user] Display Tag -- How does it work

 

Yes, It's needed in order to sort data. If you really want to get from DDBB the showed records you have to implement PaginatedList interface and send it to DisplayList as any other list or collection.


On 8/24/06, Din Sush <[EMAIL PROTECTED]> wrote:

I tried looking for an answer on the mailing list but
didn't get any breaks, here is my question.

I am running a web application which uses Spring
framework. I get really big data from the database sat
50000 records ans I want to show say 15 records at a
time.

We have decided to use DisplayTag Library, which is
very good for such purposes.

I would like to know does internally Display Tag
library work, does it get all 50000 records from the
database everytime I hit next page or page number on
the frontend. Please help.



__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
displaytag-user mailing list
displaytag-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/displaytag-user

 

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
displaytag-user mailing list
displaytag-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/displaytag-user

Reply via email to