You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Petter Måhlén <pe...@elevance.se> on 2004/02/27 18:01:27 UTC

Table question

Hi,

I want to create a table that looks something like this:


+---------------------+---------------------+---
|   Project Name 1    |  Project Name 2     | ....
+------+------+-------+------+------+-------+---
| Name | Date | Hours | Name | Date | Hours | ...
+------+------+-------+------+------+-------+---
| Eve  | 1/2  | 2.0   | Carl | 2/1  | 7.5   | 
  ...

In other words, the number of columns is dynamic, and the columns should be
grouped.

I've spent some time looking at the contrib:Table component, but I haven't
been able to figure out a way to get the double, grouped headings using
that. Is there a way that I could do that? If not, does anybody have a
suggestion for how to do it?

Thanks,

Petter


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


Re: Table question

Posted by Mindbridge <mi...@yahoo.com>.
Hi,

> I've spent some time looking at the contrib:Table component, but I haven't
> been able to figure out a way to get the double, grouped headings using
> that.

In cases like that you can use the lower level components to render the
table the way you want it.
Here is a quick example:

<table jwcid="tableView">
    <tr><td colspan=".."><span jwcid="tablePages/></td></tr>

    <!-- you might need to do the following row dynamically, with
Foreach -->
    <tr>
        <th colspan=3>Project Name 1</td>
        <th colspan=3>Project Name 2</td>
        ...
    </tr>

    <tr><th jwcid="tableColumns"/></tr>
    <tr jwcid="tableRows"><td jwcid="tableData"/></tr>
</table>

You can define the columns dynamically by generating a list of ITableColumn
object, one for each column, and passing it to the 'columns' parameter.

----- Original Message ----- 
From: "Petter Måhlén" <pe...@elevance.se>
To: "Tapestry-User" <ta...@jakarta.apache.org>
Sent: Friday, February 27, 2004 7:01 PM
Subject: Table question


> Hi,
>
> I want to create a table that looks something like this:
>
>
> +---------------------+---------------------+---
> |   Project Name 1    |  Project Name 2     | ....
> +------+------+-------+------+------+-------+---
> | Name | Date | Hours | Name | Date | Hours | ...
> +------+------+-------+------+------+-------+---
> | Eve  | 1/2  | 2.0   | Carl | 2/1  | 7.5   |
>   ...
>
> In other words, the number of columns is dynamic, and the columns should
be
> grouped.
>
> I've spent some time looking at the contrib:Table component, but I haven't
> been able to figure out a way to get the double, grouped headings using
> that. Is there a way that I could do that? If not, does anybody have a
> suggestion for how to do it?
>
> Thanks,
>
> Petter
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


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