Re: HTML_Table and altrowattributes
| From: | Bertrand Mansion | Date: | Wed, 19 May 2004 22:10:45 +0000 |
| Subject: | Re: HTML_Table and altrowattributes | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-12640@lists.php.net to get a copy of this message | ||
Wes Rood wrote:
> I am using a lot of tables in my application, so I wanted to be able to
> pull out the creation of the table and heading into a separate method.
> I will then call this method to get the table object and just add rows
> and call toHtml().
>
> This works fine, except that I'd really like to also move the setting of
> the alternate row attributes into this method as well. The problem is
> that it only works if you call it *after* adding the rows to the table,
> not before.
>
> To get it to work this way, the altrowattributes method would just save
> off the desired attributes, then use them as rows were added to the
> table (every other one, of course).
>
> To maintain backwards compatibility, it would probably have to be a new
> method, so it wouldn't break for people currently calling
> altrowattributes after adding the rows.
>
> Please let me know if this is a possible enhancement.
Why can't you call altRowAttributes when you are finished filling the table ?
Bertrand Mansion
Mamasam