DB_DO_FormBuilder and custom getters

From: Date: Fri, 14 Oct 2005 18:56:27 +0000
Subject: DB_DO_FormBuilder and custom getters
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-21479@lists.php.net to get a copy of this message
Hello everybody ! I have a database structure like this : ____________ ________________ | contacts | | contact_types | +------------------+ +--------------------------+ | id PK | | id PK | | email | | name | | idType FK | | fatherId | +------------------+ +--------------------------+ the contact_types has a tree structure (I did not use PEAR_Tree, but) made a custom getter so that : $ct= & DB_DataObject::factory("contact_types"); $ct->get(13); echo $ct->getName(); echoes the path from the root to the element (e.g. root>elt1>elt1.1) If I bind the DBDO instance to a Structures_dataGrid, it gets the name from getName() instead of reading directly the Name property from the object, which I expected. So my question is : is there a way to configure formbuilder so that it behaves like DG ? (as apparently it does not by default). For the moment I juste made a select in the fb_preDefElement but I don't like this solution. Thank you \ | / Arnaud Sellenet-Bodin Dév et dés http://demental.info Tel : 05 63 55 24 46 / | \

« previous php.pear.general (#21479) next »