Hi Jacob,

thanks for the reply, in fact I'm using ejbs so I suppose I am pulling it
from the database. Unfortunately though, in order to know how many
pages to show I presumably must get the size of the collection I want
to iterate, so I presume that means pulling all the items from the database
in one go anyway? No?

I've downloaded the suggested jar at any rate, and very much appreciate
the advice.
Brian


----- Original Message -----
From: "Jacob Hookom" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Wednesday, April 02, 2003 5:25 PM
Subject: RE: Page Iteration


> 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]
>


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

Reply via email to