RE: Page Iteration

2003-04-02 Thread Jacob Hookom
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]



RE: Page Iteration

2003-04-02 Thread apachep2
You can also search "pager".

-Original Message-
From: Brian McSweeney [mailto:[EMAIL PROTECTED] 
Sent: April 2, 2003 11: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]



Re: Page Iteration

2003-04-02 Thread Michael C. Lee Jr.
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]



Re: Page Iteration

2003-04-02 Thread Ashish Kulkarni
Hi ,
I am using a pager taglib which can be used on any
scrollable object like collection etc
I have also written a small HOWTO u can visit 
http://kulkarni_ash.tripod.com/howto/jsptaglib-howto.html

and try to use it

Anyone else using this taglib can u please verify and
let me know if i am missing some thing 

Ashish

--- Brian McSweeney <[EMAIL PROTECTED]>
wrote:
> 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
> 


__
Do you Yahoo!?
Yahoo! Tax Center - File online, calculators, forms, and more
http://tax.yahoo.com

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



Re: Page Iteration

2003-04-03 Thread Brian McSweeney
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]



Re: Page Iteration

2003-04-03 Thread Brian McSweeney
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]



Re: Page Iteration

2003-04-03 Thread Brian McSweeney
Thanks Ashish,
looks good and simple. Have you found the taglib reliable?
cheers,
Brian

- Original Message - 
From: "Ashish Kulkarni" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, April 02, 2003 6:38 PM
Subject: Re: Page Iteration


> Hi ,
> I am using a pager taglib which can be used on any
> scrollable object like collection etc
> I have also written a small HOWTO u can visit 
> http://kulkarni_ash.tripod.com/howto/jsptaglib-howto.html
> 
> and try to use it
> 
> Anyone else using this taglib can u please verify and
> let me know if i am missing some thing 
> 
> Ashish
> 
> --- Brian McSweeney <[EMAIL PROTECTED]>
> wrote:
> > 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
> > 
> 
> 
> __
> Do you Yahoo!?
> Yahoo! Tax Center - File online, calculators, forms, and more
> http://tax.yahoo.com
> 
> -
> 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]



Re: Page Iteration

2003-04-03 Thread Ashish Kulkarni
Hi Brian
I am using this taglib in my project and have no
problem what so ever till todate...

Ashish
--- Brian McSweeney <[EMAIL PROTECTED]>
wrote:
> Thanks Ashish,
> looks good and simple. Have you found the taglib
> reliable?
> cheers,
> Brian
> 
> - Original Message - 
> From: "Ashish Kulkarni" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List"
> <[EMAIL PROTECTED]>
> Sent: Wednesday, April 02, 2003 6:38 PM
> Subject: Re: Page Iteration
> 
> 
> > Hi ,
> > I am using a pager taglib which can be used on any
> > scrollable object like collection etc
> > I have also written a small HOWTO u can visit 
> >
>
http://kulkarni_ash.tripod.com/howto/jsptaglib-howto.html
> > 
> > and try to use it
> > 
> > Anyone else using this taglib can u please verify
> and
> > let me know if i am missing some thing 
> > 
> > Ashish
> > 
> > --- Brian McSweeney <[EMAIL PROTECTED]>
> > wrote:
> > > 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
> > > 
> > 
> > 
> > __
> > Do you Yahoo!?
> > Yahoo! Tax Center - File online, calculators,
> forms, and more
> > http://tax.yahoo.com
> > 
> >
>
-
> > 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]
> 


__
Do you Yahoo!?
Yahoo! Tax Center - File online, calculators, forms, and more
http://tax.yahoo.com

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



Re: Page Iteration

2003-04-03 Thread Brian McSweeney
cool,
thanks Ashish, I'll give it a try so.

One thing, on your explanation website where you iterate 
over the cached row set, is it possible to use the 
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, April 03, 2003 4:23 PM
Subject: Re: Page Iteration


> Hi Brian
> I am using this taglib in my project and have no
> problem what so ever till todate...
> 
> Ashish
> --- Brian McSweeney <[EMAIL PROTECTED]>
> wrote:
> > Thanks Ashish,
> > looks good and simple. Have you found the taglib
> > reliable?
> > cheers,
> > Brian
> > 
> > - Original Message - 
> > From: "Ashish Kulkarni" <[EMAIL PROTECTED]>
> > To: "Struts Users Mailing List"
> > <[EMAIL PROTECTED]>
> > Sent: Wednesday, April 02, 2003 6:38 PM
> > Subject: Re: Page Iteration
> > 
> > 
> > > Hi ,
> > > I am using a pager taglib which can be used on any
> > > scrollable object like collection etc
> > > I have also written a small HOWTO u can visit 
> > >
> >
> http://kulkarni_ash.tripod.com/howto/jsptaglib-howto.html
> > > 
> > > and try to use it
> > > 
> > > Anyone else using this taglib can u please verify
> > and
> > > let me know if i am missing some thing 
> > > 
> > > Ashish
> > > 
> > > --- Brian McSweeney <[EMAIL PROTECTED]>
> > > wrote:
> > > > 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
> > > > 
> > > 
> > > 
> > > __
> > > Do you Yahoo!?
> > > Yahoo! Tax Center - File online, calculators,
> > forms, and more
> > > http://tax.yahoo.com
> > > 
> > >
> >
> -
> > > 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]
> > 
> 
> 
> __
> Do you Yahoo!?
> Yahoo! Tax Center - File online, calculators, forms, and more
> http://tax.yahoo.com
> 
> -
> 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]



Re: Page Iteration

2003-04-03 Thread Ashish Kulkarni
Hi,

I think u can use it, i have not used it.. any think
which u can scroll can be used

Ashish
--- Brian McSweeney <[EMAIL PROTECTED]>
wrote:
> cool,
> thanks Ashish, I'll give it a try so.
> 
> One thing, on your explanation website where you
> iterate 
> over the cached row set, is it possible to use the
>  tag for this? 
> 
> cheers,
> Brian
> 
> - Original Message - 
> From: "Ashish Kulkarni" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List"
> <[EMAIL PROTECTED]>
> Sent: Thursday, April 03, 2003 4:23 PM
> Subject: Re: Page Iteration
> 
> 
> > Hi Brian
> > I am using this taglib in my project and have no
> > problem what so ever till todate...
> > 
> > Ashish
> > --- Brian McSweeney <[EMAIL PROTECTED]>
> > wrote:
> > > Thanks Ashish,
> > > looks good and simple. Have you found the taglib
> > > reliable?
> > > cheers,
> > > Brian
> > > 
> > > - Original Message - 
> > > From: "Ashish Kulkarni"
> <[EMAIL PROTECTED]>
> > > To: "Struts Users Mailing List"
> > > <[EMAIL PROTECTED]>
> > > Sent: Wednesday, April 02, 2003 6:38 PM
> > > Subject: Re: Page Iteration
> > > 
> > > 
> > > > Hi ,
> > > > I am using a pager taglib which can be used on
> any
> > > > scrollable object like collection etc
> > > > I have also written a small HOWTO u can visit 
> > > >
> > >
> >
>
http://kulkarni_ash.tripod.com/howto/jsptaglib-howto.html
> > > > 
> > > > and try to use it
> > > > 
> > > > Anyone else using this taglib can u please
> verify
> > > and
> > > > let me know if i am missing some thing 
> > > > 
> > > > Ashish
> > > > 
> > > > --- Brian McSweeney
> <[EMAIL PROTECTED]>
> > > > wrote:
> > > > > 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
> > > > > 
> > > > 
> > > > 
> > > >
> __
> > > > Do you Yahoo!?
> > > > Yahoo! Tax Center - File online, calculators,
> > > forms, and more
> > > > http://tax.yahoo.com
> > > > 
> > > >
> > >
> >
>
-
> > > > 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]
> > > 
> > 
> > 
> > __
> > Do you Yahoo!?
> > Yahoo! Tax Center - File online, calculators,
> forms, and more
> > http://tax.yahoo.com
> > 
> >
>
-
> > 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]
> 


=
A$HI$H

__
Do you Yahoo!?
Yahoo! Tax Center - File online, calculators, forms, and more
http://tax.yahoo.com

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



Re: Page Iteration

2003-04-03 Thread varanasi kiran
We used Pager taglib in our project and it rocks ! But, I am not happy about 
handing over a collection of 1000 objects to the pager taglib. U can imagine 
the performance if 100 concurrent users are logged in.

Thanks,

_
Mobile, masti, magic! Cool ringtones & logos.  http://www.msn.co.in/mobile/ 
Get noticed

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