Hi Michael,
thanks for the reply, I'm using ejbs, so wouldn't you have to get a
count of the whole collection size to know how many pages exist
in the first place to iterate over? Doesn't this mean you are still
going to have to get all the objects anyway?
cheers,
Brian

----- Original Message -----
From: "Michael C. Lee Jr." <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, April 02, 2003 6:31 PM
Subject: Re: Page Iteration


> These are database specific and probably won't work anyway for queries
that
> require things such as order by, etc.
> In JDBC there is a call setMaxRows() that limits the total set of data
> returned from the database. Unfortuantely, the full query is performed but
> DB optimizations of that sort should be done by the DBA using a query
> analyzer type tool.
> Michael Lee
>
> ----- Original Message -----
> From: "Jacob Hookom" <[EMAIL PROTECTED]>
> To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
> Sent: Wednesday, April 02, 2003 11:25 AM
> 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]
>


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

Reply via email to