You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Reinier Mostert <re...@clabo.co.za> on 2003/04/05 23:57:34 UTC
Building a Custom Table
Hi all,
I've got a working Contrib table (thanx to the help I got from this
list), but now I'm trying to add some columns to it, and shuffle the
rows a bit differently.
I'm reading my data from a database - for example a date and a value. I
want to show these in a table, and add a break of one line after every
week, that is after every seventh day (in my case, after every
Tuesday). I also want to synthesize two columns, one that keeps a
running total for the week, and one that keeps a running total for the
table. I also want to specify the size of the table so that I can show
all the data on one page.
So far I've been synthesizing the data before passing it to the table
model (in the accessor class), but I'm wondering if there is a cleaner
way to do it in the table.
Please advise whether this is possible using the TableView.
Thanks for your input.
reinier
--
------------------------------------------------------------------------------
reinier.mostert@bigfoot.com Linux - choice of a GNU
generation!
Woody: Hey, Mr. Peterson, what's up?
Norm: The warranty on my liver.
-- Cheers, Breaking In Is Hard to Do
Re: Building a Custom Table
Posted by Mindbridge <mi...@yahoo.com>.
Hi Reinier,
I think the key is in this sentence:
> I also want to specify the size of the table so that I can show
> all the data on one page.
If I understand correctly, the table that you want to display would neither
have multiple pagses, nor would have sorting by a column. As such, I do not
think you would get a benefit from using Contrib:Table -- it is useful only
when one needs one or both of those features. 'Table' can do everything you
requested, but I think it would be an overkill in this case.
I would suggest instead to build your table manually using the Foreach and
Conditional components. Please have a look at their documentation in the
Component Reference (located in web/doc/ComponentReference in the Tapestry
distribution) -- it contains some great examples that are very relevant to
what you want to do and are probably directly applicable.
I hope this is helpful.
Best regards,
-mb
----- Original Message -----
From: "Reinier Mostert" <re...@clabo.co.za>
To: "Tapestry users" <ta...@jakarta.apache.org>
Sent: Saturday, April 05, 2003 11:57 PM
Subject: Building a Custom Table
> Hi all,
>
> I've got a working Contrib table (thanx to the help I got from this
> list), but now I'm trying to add some columns to it, and shuffle the
> rows a bit differently.
>
> I'm reading my data from a database - for example a date and a value. I
> want to show these in a table, and add a break of one line after every
> week, that is after every seventh day (in my case, after every
> Tuesday). I also want to synthesize two columns, one that keeps a
> running total for the week, and one that keeps a running total for the
> table. I also want to specify the size of the table so that I can show
> all the data on one page.
>
> So far I've been synthesizing the data before passing it to the table
> model (in the accessor class), but I'm wondering if there is a cleaner
> way to do it in the table.
>
> Please advise whether this is possible using the TableView.
>
> Thanks for your input.
>
> reinier
>
>
> --
> --------------------------------------------------------------------------
----
> reinier.mostert@bigfoot.com Linux - choice of a GNU
> generation!
>
> Woody: Hey, Mr. Peterson, what's up?
> Norm: The warranty on my liver.
> -- Cheers, Breaking In Is Hard to Do
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org