Re: Re: HTML_Table: thead, tfoot and tbody
| From: | Mark Wiesemann | Date: | Wed, 03 Aug 2005 07:59:28 +0000 |
| Subject: | Re: Re: HTML_Table: thead, tfoot and tbody | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-39152@lists.php.net to get a copy of this message | ||
Bertrand Mansion wrote:
[Christian:]
>>But that would mean that I have to keep track what is in which rows by
>>myself - this is a convenience class, so it should be done automatically.
> Exactly, so I am -1 for Klaus' idea. You don't know, and don't have to know,
> beforehand what your table is going to look like.
The last idea came from me.
We are talking here about approximately zero, one or two rows in the
tables that will belong to <thead> or <tfoot>. I don't think that
anybody will repeat 10 rows on each page (when printing out). You're
right when saying that you have to keep track about it. So let's say
that the last parameter does not indicate the row where <tfoot> should
start but instead it indicates the number of rows that belong to <tfoot>
(and then internally calculated from the total number of rows
backwards). As were are talking here about here about a very low number
of rows that belong to <tfoot> (and <thead>) one should be able to
remember the number of rows for these sections.
But I'm also happy for suggestions on how to solve the problem in the
last accepted solution (using setHeaderContents(), setCellContents(),
setBodyCellContents() and setFooterContents()):
How to prevent users from doing strange things like this?
$table->setCellContents(0, 0, '<tbody> row before <thead> row');
$table->setHeaderContents(1, 0, '<thead> row after <tbody> row');
$table->setFooterContents(2, 0, '<tfoot> row before <tbody> row');
$table->setCellContents(3, 0, '<tbody> row after <tfoot> row');
How can this be rendered? When putting row 1 in <thead>, rows 0 and 3 in
<tbody> and row 2 in <tfoot> all browser won't show the table in the
order the rows were specified. They will first show row 1, then rows 0
and 3, then row 2.
Mark