Re: HTML_QuickForm_ElementTable

From: Date: Sat, 08 Apr 2006 17:47:21 +0000
Subject: Re: HTML_QuickForm_ElementTable
References: 1 2  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-42166@lists.php.net to get a copy of this message
On 4/8/06, Bertrand Mansion <bmansion@mamasam.com> wrote: > Justin Patrin wrote: > > >Due to the proddings of Helgi I've finally cleaned up the ElementTable > >element which is part of DB_DataObject_FormBuilder for proposal as its > >own package. I've updated the code a bit and even fixed a bug when > >addElement is used before the table is filled out. Let me know what > >you think. > > > >http://pear.php.net/pepr/pepr-proposal-show.php?id=387 > > I wouldn't use a style attribute in the generated html. The style should be up > to the user and can be defined in the css using the class name. I'd also set a > specific class name for the table header and the table itself. You could also > use the new HTML_table functionality with a thead, tbody and tfoot. > I'm actually not sure what using this functionality entails. I switched from using setCellContents to setHeaderContents, but I didn't check the source to see if it changed. There hasn't been any documentation AFAIK for the "new way" to use HTML_Table. 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. (Actually I'm not too sure what the real utility of using thead/tbody/tfoot is, especially in this case where the thead is a simple row of TH cells and the first column is also TH cells....but oh well, I suppose I should use things "correctly".) > If you need options like column_names, row_names, use an $options array in the > constructor and a setOptions() method. > I suppose I could add yet another option to do this, but I'm not sure how useful it is. The idea was to allow people to build the data as they go, see the first example where I use addColumnHeader and addRow. I actually did think of a possible way to make the whole interface more HTML_Table like, but I'm going to have to be careful trying to set it up... -- Justin Patrin

« previous php.pear.dev (#42166) next »