Hi everybody,
 
I looked at the displaytag source code and realize some things (although I 
don't understand everything there):
 
- when displaytag gets our list (the one specified in the 'name' attribute of 
display:table), it creates an iterator. when we go to a particular page, 
displaytag calculates the start and end postions of the rows that need to be 
displayed. For example, we are at page 9 and the page size is 10, then start = 
(9-1)*pagesize + 1 and end = start + pagesize. So, with an iterator, displaytag 
has only one choice to know which element in the iterator is at the start 
position. That choice is counting from the beginning of that iterator until we 
count to 'start". My question is 'why don't we use an ArrayList instead of an 
Iterator so that we can go to an element at any position directly?'.
 
I created an example where my data (which have 2 columns, one is integer and 
one is string)contains 60710 rows. I notice that after I sorted by the string 
column, it took me a long time to go to the next page.



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
displaytag-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/displaytag-user

Reply via email to