You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Mohammad Shamsi <m....@gmail.com> on 2007/12/22 20:32:25 UTC
[T5] - list paging from database ?
Hi all,
Grid Component related,
I have a large size of data in database, i want to retrieve each pages data
separately, is it any way to set list size and list data separately in Grid
component ?
formerly, in struts and jsp i used dispalytag compoent
in DisplayTag (a grid component with paging) Component, its possible to set
list size and list data separately.
this feature allows developers to retrieve just current page data and show
it on page,
i need something like this in Tapestry 5. any idea ????
--
sincerely yours
M. H. Shamsi
Re: [T5] - list paging from database ?
Posted by Mohammad Shamsi <m....@gmail.com>.
thats it. Thanks Robert
On Dec 23, 2007 12:55 AM, Robert Zeigler <ro...@scazdl.org> wrote:
> Hi Mohammad,
>
> I had the same issue... collections of data with, eg, 250,000 "rows";
> clearly a bad idea to try to have all of that in memory at the same
> time.
>
> What you want to do is provide your own implementation of
> "GridDataSource" to grid's "source" parameter, rather than providing
> a collection.
>
> Check out:
>
> http://tapestry.apache.org/tapestry5/apidocs/org/apache/tapestry/grid/GridDataSource.html
>
> for more details. Pretty straightforward, and it provides exactly
> what you're looking for: a way to say "this many total rows" and the
> opportunity to fetch only the current page of information.
>
> Cheers,
>
> Robert
>
>
>
> On Dec 22, 2007, at 12/222:01 PM , Mohammad Shamsi wrote:
>
> > Hi Sven,
> >
> > No,
> > Sorry about my pour English,
> >
> > in tapestry grid component (I am not sure), you most fetch all data
> > to a
> > collection, list or array and then show them with paging, suppose
> > that data
> > list have 1 million item, thats not good idea to fetch 1 million
> > records and
> > hold them in application space.
> >
> > with displaytag ( an open source taglib for grid and paging), its
> > possible
> > to fetch just one pages data and show them in page.
> >
> > in this taglib, you have to choice :
> >
> > 1 - just like tapestry grid component setting a list or array as a
> > data
> > source.
> > (this list has all items that most be shown to user)
> >
> >
> > 2 - you can set list size (number of all items) and current page
> > data as a
> > data source
> > in this case you most select only current page data
> >
> > ?
> >
> >
> >
> >
> >
> > On Dec 22, 2007 11:18 PM, Sven Homburg <ho...@googlemail.com>
> > wrote:
> >
> >>
> >> if i understand correctly, you should grid parameter "rowsPerPage"
> >>
> >>
> >> dalahoo wrote:
> >>>
> >>> Hi all,
> >>>
> >>> Grid Component related,
> >>>
> >>> I have a large size of data in database, i want to retrieve each
> >>> pages
> >>> data
> >>> separately, is it any way to set list size and list data
> >>> separately in
> >>> Grid
> >>> component ?
> >>>
> >>> formerly, in struts and jsp i used dispalytag compoent
> >>> in DisplayTag (a grid component with paging) Component, its
> >>> possible to
> >>> set
> >>> list size and list data separately.
> >>> this feature allows developers to retrieve just current page data
> >>> and
> >> show
> >>> it on page,
> >>>
> >>> i need something like this in Tapestry 5. any idea ????
> >>>
> >>> --
> >>> sincerely yours
> >>> M. H. Shamsi
> >>>
> >>>
> >>
> >>
> >> -----
> >> ---
> >> best regards
> >> Sven
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/-T5----list-paging-from-database---tp14472521p14472665.html
> >> Sent from the Tapestry - User mailing list archive at Nabble.com.
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> >> For additional commands, e-mail: users-help@tapestry.apache.org
> >>
> >>
> >
> >
> > --
> > sincerely yours
> > M. H. Shamsi
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
--
sincerely yours
M. H. Shamsi
Re: [T5] - list paging from database ?
Posted by Robert Zeigler <ro...@scazdl.org>.
Hi Mohammad,
I had the same issue... collections of data with, eg, 250,000 "rows";
clearly a bad idea to try to have all of that in memory at the same
time.
What you want to do is provide your own implementation of
"GridDataSource" to grid's "source" parameter, rather than providing
a collection.
Check out:
http://tapestry.apache.org/tapestry5/apidocs/org/apache/tapestry/grid/GridDataSource.html
for more details. Pretty straightforward, and it provides exactly
what you're looking for: a way to say "this many total rows" and the
opportunity to fetch only the current page of information.
Cheers,
Robert
On Dec 22, 2007, at 12/222:01 PM , Mohammad Shamsi wrote:
> Hi Sven,
>
> No,
> Sorry about my pour English,
>
> in tapestry grid component (I am not sure), you most fetch all data
> to a
> collection, list or array and then show them with paging, suppose
> that data
> list have 1 million item, thats not good idea to fetch 1 million
> records and
> hold them in application space.
>
> with displaytag ( an open source taglib for grid and paging), its
> possible
> to fetch just one pages data and show them in page.
>
> in this taglib, you have to choice :
>
> 1 - just like tapestry grid component setting a list or array as a
> data
> source.
> (this list has all items that most be shown to user)
>
>
> 2 - you can set list size (number of all items) and current page
> data as a
> data source
> in this case you most select only current page data
>
> ?
>
>
>
>
>
> On Dec 22, 2007 11:18 PM, Sven Homburg <ho...@googlemail.com>
> wrote:
>
>>
>> if i understand correctly, you should grid parameter "rowsPerPage"
>>
>>
>> dalahoo wrote:
>>>
>>> Hi all,
>>>
>>> Grid Component related,
>>>
>>> I have a large size of data in database, i want to retrieve each
>>> pages
>>> data
>>> separately, is it any way to set list size and list data
>>> separately in
>>> Grid
>>> component ?
>>>
>>> formerly, in struts and jsp i used dispalytag compoent
>>> in DisplayTag (a grid component with paging) Component, its
>>> possible to
>>> set
>>> list size and list data separately.
>>> this feature allows developers to retrieve just current page data
>>> and
>> show
>>> it on page,
>>>
>>> i need something like this in Tapestry 5. any idea ????
>>>
>>> --
>>> sincerely yours
>>> M. H. Shamsi
>>>
>>>
>>
>>
>> -----
>> ---
>> best regards
>> Sven
>> --
>> View this message in context:
>> http://www.nabble.com/-T5----list-paging-from-database---tp14472521p14472665.html
>> Sent from the Tapestry - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>
>
> --
> sincerely yours
> M. H. Shamsi
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: [T5] - list paging from database ?
Posted by Sven Homburg <ho...@googlemail.com>.
have a look at
http://wiki.apache.org/tapestry/Tapestry5HibernateGridDatasource
dalahoo wrote:
>
> Hi Sven,
>
> No,
> Sorry about my pour English,
>
> in tapestry grid component (I am not sure), you most fetch all data to a
> collection, list or array and then show them with paging, suppose that
> data
> list have 1 million item, thats not good idea to fetch 1 million records
> and
> hold them in application space.
>
> with displaytag ( an open source taglib for grid and paging), its possible
> to fetch just one pages data and show them in page.
>
> in this taglib, you have to choice :
>
> 1 - just like tapestry grid component setting a list or array as a data
> source.
> (this list has all items that most be shown to user)
>
>
> 2 - you can set list size (number of all items) and current page data as a
> data source
> in this case you most select only current page data
>
> ?
>
>
>
>
>
> On Dec 22, 2007 11:18 PM, Sven Homburg <ho...@googlemail.com> wrote:
>
>>
>> if i understand correctly, you should grid parameter "rowsPerPage"
>>
>>
>> dalahoo wrote:
>> >
>> > Hi all,
>> >
>> > Grid Component related,
>> >
>> > I have a large size of data in database, i want to retrieve each pages
>> > data
>> > separately, is it any way to set list size and list data separately in
>> > Grid
>> > component ?
>> >
>> > formerly, in struts and jsp i used dispalytag compoent
>> > in DisplayTag (a grid component with paging) Component, its possible to
>> > set
>> > list size and list data separately.
>> > this feature allows developers to retrieve just current page data and
>> show
>> > it on page,
>> >
>> > i need something like this in Tapestry 5. any idea ????
>> >
>> > --
>> > sincerely yours
>> > M. H. Shamsi
>> >
>> >
>>
>>
>> -----
>> ---
>> best regards
>> Sven
>> --
>> View this message in context:
>> http://www.nabble.com/-T5----list-paging-from-database---tp14472521p14472665.html
>> Sent from the Tapestry - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>
>
> --
> sincerely yours
> M. H. Shamsi
>
>
-----
---
best regards
Sven
--
View this message in context: http://www.nabble.com/-T5----list-paging-from-database---tp14472521p14474465.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: [T5] - list paging from database ?
Posted by Mohammad Shamsi <m....@gmail.com>.
Hi Sven,
No,
Sorry about my pour English,
in tapestry grid component (I am not sure), you most fetch all data to a
collection, list or array and then show them with paging, suppose that data
list have 1 million item, thats not good idea to fetch 1 million records and
hold them in application space.
with displaytag ( an open source taglib for grid and paging), its possible
to fetch just one pages data and show them in page.
in this taglib, you have to choice :
1 - just like tapestry grid component setting a list or array as a data
source.
(this list has all items that most be shown to user)
2 - you can set list size (number of all items) and current page data as a
data source
in this case you most select only current page data
?
On Dec 22, 2007 11:18 PM, Sven Homburg <ho...@googlemail.com> wrote:
>
> if i understand correctly, you should grid parameter "rowsPerPage"
>
>
> dalahoo wrote:
> >
> > Hi all,
> >
> > Grid Component related,
> >
> > I have a large size of data in database, i want to retrieve each pages
> > data
> > separately, is it any way to set list size and list data separately in
> > Grid
> > component ?
> >
> > formerly, in struts and jsp i used dispalytag compoent
> > in DisplayTag (a grid component with paging) Component, its possible to
> > set
> > list size and list data separately.
> > this feature allows developers to retrieve just current page data and
> show
> > it on page,
> >
> > i need something like this in Tapestry 5. any idea ????
> >
> > --
> > sincerely yours
> > M. H. Shamsi
> >
> >
>
>
> -----
> ---
> best regards
> Sven
> --
> View this message in context:
> http://www.nabble.com/-T5----list-paging-from-database---tp14472521p14472665.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
--
sincerely yours
M. H. Shamsi
Re: [T5] - list paging from database ?
Posted by Sven Homburg <ho...@googlemail.com>.
if i understand correctly, you should grid parameter "rowsPerPage"
dalahoo wrote:
>
> Hi all,
>
> Grid Component related,
>
> I have a large size of data in database, i want to retrieve each pages
> data
> separately, is it any way to set list size and list data separately in
> Grid
> component ?
>
> formerly, in struts and jsp i used dispalytag compoent
> in DisplayTag (a grid component with paging) Component, its possible to
> set
> list size and list data separately.
> this feature allows developers to retrieve just current page data and show
> it on page,
>
> i need something like this in Tapestry 5. any idea ????
>
> --
> sincerely yours
> M. H. Shamsi
>
>
-----
---
best regards
Sven
--
View this message in context: http://www.nabble.com/-T5----list-paging-from-database---tp14472521p14472665.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org