Re: HTML_QuickForm_ElementTable
| From: | Mark Wiesemann | Date: | Sat, 08 Apr 2006 18:09:46 +0000 |
| Subject: | Re: HTML_QuickForm_ElementTable | ||
| References: | 1 2 3 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-42169@lists.php.net to get a copy of this message | ||
Justin Patrin wrote:
> There hasn't been any documentation AFAIK for the "new way" to use
> HTML_Table.
Wrong. ;-) I did not only change the HTML_Table code to enable
thead/tfoot/tbody, but also updated the documentation. You can find
information at the end of the "introduction" page, on the constructor
description page and there are three pages for getHeader(), getFooter(),
getBody(). And the changelog should also mention how to use this new
feature.
> I just changed it to do this....seems a bit strange how I have to grab
> the header....but I guess it was a good choice.
There was a long discussion about this on pear-dev. The current
implementation idea came from Christian Weiske and there were some
people that agreed to this solution.
Your usage of this new HTML_Table feature looks good, it is the way it
was intended.
> (Actually I'm not too sure what the real utility of using
> thead/tbody/tfoot is, [...]
There are accessibility reasons (e.g. when visually impaired people use
software that have voice output) and it makes different handling for
header/footer and body rows easier (e.g. for "zebra style" tables).
The reworked HTMLTable renderer of Structures_DataGrid also benefits
from this second reason.
> especially in this case where the thead is a simple row of TH cells
> and the first column is also TH cells
In this case, especially the first mentioned reason is applicable. And:
Most times <thead> will only contain <th> cells.
Regards,
Mark