You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Watter <ma...@welchkin.net> on 2007/08/10 21:30:10 UTC

[T5] Struggling with Grid

As the message title suggests, I'm really struggling just a bit with the Grid
component.

The Grid component seems fantastic for fairly simple use cases, and I have
no doubt that it works well in situations that are  a little more complex,
but I can't quite figure out the more complex usage situations. I have a
list of courses that I want to display in the Grid. If all I wanted to do
was output a row of textual information associated with each individual
attribute of a course, then Grid is wonderfully simple to use. In my case
however, the information that I want to display for each course not that
straightforward. Among other things, each row will contain a list of the
locations where that course is held as well as thumbnails next to each
location of the building. 

With a Loop component, this is extremely simple. I just pull the items from
the course and display them manually for each iteration of the loop. I
thought Grid would just be an enhancement of Loop with added benefits like
automatic paging and sortable columns, but that doesn't seem to be the case.

Speaking of paging, does anyone have an example of how to implement paging
without pulling back the entire list of objects from the database every time
a users switches pages? If I only pull back the 20 I plan to show on a page,
then I end up with just one page. I need to tell the Grid that there are a
total of xxx items so it generates the correct page links, but I must have
missed the property to do that; or perhaps it's handled in some other way
that I haven't yet figured out.

Thanks in advance for any suggestions you might have.


-- 
View this message in context: http://www.nabble.com/-T5--Struggling-with-Grid-tf4250632.html#a12097641
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] Struggling with Grid

Posted by Massimo Lusetti <ml...@gmail.com>.
On 8/10/07, Watter <ma...@welchkin.net> wrote:

> Speaking of paging, does anyone have an example of how to implement paging
> without pulling back the entire list of objects from the database every time
> a users switches pages? If I only pull back the 20 I plan to show on a page,
> then I end up with just one page. I need to tell the Grid that there are a
> total of xxx items so it generates the correct page links, but I must have
> missed the property to do that; or perhaps it's handled in some other way
> that I haven't yet figured out.

Did you take a look at GridDataSource?

-- 
Massimo
http://meridio.blogspot.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: [T5] Struggling with Grid

Posted by Watter <ma...@welchkin.net>.
I had bee limiting my search for information to the user mailing list. Once I
realized that there was a lot of this kind of talk on the dev list, I
searched there and found a number of helpful posts that give me some hints
as to how I might accomplish what I need. Specifically using <t:parameter
name="xxxCell"> to indicate a cell and then putting whatever I wanted inside
that cell.

Matt


Watter wrote:
> 
> As the message title suggests, I'm really struggling just a bit with the
> Grid component.
> 
> The Grid component seems fantastic for fairly simple use cases, and I have
> no doubt that it works well in situations that are  a little more complex,
> but I can't quite figure out the more complex usage situations. I have a
> list of courses that I want to display in the Grid. If all I wanted to do
> was output a row of textual information associated with each individual
> attribute of a course, then Grid is wonderfully simple to use. In my case
> however, the information that I want to display for each course not that
> straightforward. Among other things, each row will contain a list of the
> locations where that course is held as well as thumbnails next to each
> location of the building. 
> 
> With a Loop component, this is extremely simple. I just pull the items
> from the course and display them manually for each iteration of the loop.
> I thought Grid would just be an enhancement of Loop with added benefits
> like automatic paging and sortable columns, but that doesn't seem to be
> the case.
> 
> Speaking of paging, does anyone have an example of how to implement paging
> without pulling back the entire list of objects from the database every
> time a users switches pages? If I only pull back the 20 I plan to show on
> a page, then I end up with just one page. I need to tell the Grid that
> there are a total of xxx items so it generates the correct page links, but
> I must have missed the property to do that; or perhaps it's handled in
> some other way that I haven't yet figured out.
> 
> Thanks in advance for any suggestions you might have.
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/-T5--Struggling-with-Grid-tf4250632.html#a12099160
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