Re: Re: HTML_Table: thead, tfoot and tbody
| From: | Christian Weiske | Date: | Fri, 29 Jul 2005 17:00:56 +0000 |
| Subject: | Re: Re: HTML_Table: thead, tfoot and tbody | ||
| References: | 1 2 3 4 5 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-39030@lists.php.net to get a copy of this message | ||
Helgi,
> You want to have 3x tables for something that only applies to one
> table ?
> You mean like instead of defining the row part the class has 3x
> functions which each take in a array that then generate the table ?
>
> thead()
> tbody()
> tfoot()
>
> Well that sounds like a somewhat of a plan, at least would work good
> enough for the stupid users, you are talking about something like that ?
A table looks like that:
<table>
<caption>This is my table caption</caption>
<thead>
<tr>
<th colspan="2">Money</th>
<th colspan="2">Persons</th>
</tr>
<tr>
<th>Absolute</th>
<th>Percent</th>
<th>Absolute</th>
<th>Percent</th>
</tr>
</thead>
<tfoot>
<!-- sum of all at the end of the table.
Note that tfoot is rendered *after* tbody, but
has to be defined *before* it. Mainly for large tables
which take long to load, so that you see the
conclusion at the end of the table while still loading.
-->
<tr>
<td>100.000€</td>
<td>100%</td>
<td>20</td>
<td>100%</td>
</tr>
</tfoot>
<tbody>
<tr>
<td>200€</td>
<td>0.1%</td>
<td>Christian</td>
<td>Christian,Jana</td>
<td>2%</td>
</tr>
<!-- more stupid data -->
</tbody>
</table>
So the you can see tbody, thead and tfoot as three different tables -
which just have the same width (in cols).
I'd like to have
a) a setCellContents-function for each of the three OR
b) the current setCellContents-function extendet to a fourth parameter
at which you can pass the type - thead, tbody, tfoot.
When just defining row ranges (thead form 0 to 2, tbody from 3 to 1001,
tfoot from 1002 to 1002), one can easily get confused - if I add a data
(tbody) row at 1002, the foot moves by one from 1002 to 1003. So I'd
have to take care of changing the foot row, just because I changed/added
some body rows!
Regards/MfG,
Christian Weiske
--
XMMS is playing now:
Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc
Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc