[ http://jira.codehaus.org/browse/DISPL-129?page=comments#action_45184 ] 

Jean-Baptiste Nizet commented on DISPL-129:
-------------------------------------------

I have implemented a solution for partial lists (allowing for the value list 
pattern). This solution is base on an additional interface: PaginatedList, 
which is trivial to implement and holds the partial list as well as the page 
size, the page number, the full list size, the sort criterion and the sort 
direction.
This solution allows for multiple tables in a single page, and allows 
user-chosen names for sort and page parameter in sort and pagination links. The 
application thus doesn't have to decode the display-tag parameter to get the 
requested page number or sort criteria.
I'll attach a zip file containing the added and modified sources, as well as a 
README. Sorry not to give you a patch, but I am behind a corporate firewall, 
which makes it difficult for me to build a patch. Sorry also that my solution 
is based on displaytag 1.0, but since the latest sources already include 
another solution for partial lists, I considered it wasn't a good idea to base 
my solution on it.

JB.

> allow for partial lists where the rest remains in DB
> ----------------------------------------------------
>
>          Key: DISPL-129
>          URL: http://jira.codehaus.org/browse/DISPL-129
>      Project: DisplayTag
>         Type: Improvement
>   Components: Paging/Sorting
>     Versions: 1.0 RC2
>     Reporter: fabrizio giustina
>      Fix For: 1.1

>
>
> ====
> imported from sf tracker
> id 951204 
> submitted by Ralf Hauser - ralfhauser
> http://sourceforge.net/support/tracker.php?aid=951204 
> ====
> displaytag is an amazing tool to spare end-users the
> long download times of huge tables and make tables more
> versatile.
> When tables get really big, this approach still might
> be problematic because the java.util.List a) take a
> long time to assemble from the DB and b) may end up so
> big that it will be a problem if there are multiple
> parallel user sessions with huge java.util.List (or
> request.setAttribute... as alternative to sessions)
> Suggestion:
> =========
> Allow to only provide partial lists to begin with - the
> "display:table" tag as per
> http://displaytag.sourceforge.net/tagreference.html#Attributes
> would need the following additional attributes:
> 1) list-size- default would be the size of the
> java.util.List, otherwise, the programmer should
> retrieve that number with SELECT COUNT(*) FROM ...
> 2) call-back function name - e.g. struts action to call
> with off-set parameter and rowcount if the rows to
> display are not present in the partial list in the
> request/session scope. On the DB-side e.g. SELECT *
> FROM `TBL_MESSAGE` LIMIT 110, 145 is readily available
> to do that
> 3) listOffset (optional) - if java.util.List's first
> entry is not what logically is considered the first element
> obviously doing this is imcompatible with sort="list"
> ====
> Date: 2004-09-13 17:45
> Sender: ralfhauserAccepting Donations
> Logged In: YES 
> user_id=266141
> see a solution approach in
> http://sourceforge.net/tracker/index.php?func=detail&aid=1026408&;
> group_id=73068&atid=536613
> Date: 2004-09-07 03:51
> Sender: ianbdev
> Logged In: YES 
> user_id=461701
> Hello,
> I posted the 872183 request.
> Since then we've come up with an alternate approach.
> See [ 1023387 ] Pagination - use subList instead of iterating 
> all records.
> If this change is implemented then you can implement a List 
> object that overrides the subList method of the List interface.
> This would allow you to limit database/datasource accesses 
> to obtain just the few page records required for the page 
> being displayed.
> No other changes to display tag are required.
> Date: 2004-05-27 15:12
> Sender: carlossg
> Logged In: YES 
> user_id=792979
> This has been already pointed out in RFE 872183
> Date: 2004-05-10 21:13
> Sender: smccrory
> Logged In: YES 
> user_id=20779
> Also see https://sourceforge.net/tracker/index.php?
> func=detail&aid=950819&group_id=73068&atid=536613

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira



-------------------------------------------------------
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-devel mailing list
displaytag-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/displaytag-devel

Reply via email to