If the data is coming from the DB, you should NOT pull down all the data and
slap it in their session for paging.  It's a waste of resources, especially
if they found what they wanted on the first page.

A better solution would be to use DB -specific bounding of the results
returned, like MySql's LIMIT on SELECT queries (btw, google uses MySql).  By
bounding the data returned from the DB in the first place, you just return
all objects received in the scope of the SELECT statement to the page.

If you aren't pulling from the DB, look at JSTL under Taglibs->Standard at
Jakarta's web site.  Their demo war for JSTL goes over scoped iteration.

-Jacob

| -----Original Message-----
| From: Brian McSweeney [mailto:[EMAIL PROTECTED]
| Sent: Wednesday, April 02, 2003 10:13 AM
| To: Struts Users Mailing List
| Subject: Page Iteration
| 
| Hi all,
| 
| I want to iterate over a collection and display a certain amount of items
| per page and list all the
| further pages available (just like on google).
| 
| I presume this is a feature that  has been added a million times.
| 
| Did a quick search on the list and I see that use of the iterator with
| parameter offset can be used.
| Is this the general approach people would recommend?
| 
| Any good resources on showing how to do it?
| cheers,
| Brian


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to