Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.0.2

Request #2958 crossLink customization
Submitted: 2004-12-13 15:56 UTC
From: ruempler at topconcepts dot com Assigned: justinpatrin
Status: Closed Package: DB_DataObject_FormBuilder
PHP Version: Irrelevant OS: irrelevant
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 36 - 1 = ?

 
 [2004-12-13 15:56 UTC] ruempler at topconcepts dot com
Description: ------------ As once discussed, a callback/function for customizing the fields in a crossLink would be nice, so that it's possible to change there WHERE and the SELECT, maybe the whole Query, or the DataObject (before ->find() is done). For example, ATM date customization and restricting the WHERE clause is not possible, all entries from the the toField-Table are shown.

Comments

 [2004-12-13 20:23 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2004-12-14 05:46 UTC] frank dot NOSPAM at fahs dot net
I was the one who sparked the similar conversation. My example was such: 2 tables projects, images images has a proj_id field as each image belongs to a project projects has a img_id field that links one of the images that belong to it as a key image. Problem is when a image is chosen I dont want all images to show. I only want the images that belong to that project to show when FB is used. What I thought would be a great and simple solution, realizing that it would probably require cooperation with DataObject, is to allow the database.link.ini to handle a kind of where clause such as: [projects] key_img = images:img_id @ images:proj_id = proj_id where the '@' symbol would obviously define the where clause. Makes it super simple for the user. Here is at least some of what I did to work around the issue as is. Note that if you see this and think "hey you could have done this simpler by ...", I would love to know that thought. Dataobjects-- Images.php ... /* Change find() to provide only images selected for this project */ function find($n = false, $all = false) { if(!$all && isset($_POST['edit_proj']) && isset($_POST['submit_proj']) && ($_POST['submit_proj'] != "Edit Image")) { $this->img_project = $_REQUEST['edit_proj']; } return parent::find($n); } So code wise thats not too bad (though it took me a while to get it tweaked just right). What BOTHERS me most about it is that I have to use $_REQUEST variables in my dataobject, bleah thats yucky. It would be so much nicer if it could be defined in the link.ini. That way it is only used when that particular crosslink is accessed and you dont have to escape it for all other requests. I can think of a bunch of other 'pros' incluidng amplifying the simplicity that DO and DOFB seem to strive for. I also understand Justins concerns of a BC break and its lack of usage in DO other than to provide FB with more strenght. Hey wait isnt that enough =) Frank
 [2004-12-14 05:52 UTC] frank at fahs dot net
Second note...Justins suggestion makes alot of sense upon further consideration. Its still pretty simple and it would allow for a variety of tweaks. But I do love the .ini setup, it seems so clean. Of course I have no idea currently what it would mean on the inside. But I would like to find out. Anyone? FF
 [2004-12-14 08:13 UTC] ruempler at topconcepts dot com
Justin, I meant to change the selectAdd, and where WHERE, so I can do things like date customization in the cross-link. Your solution sounds pretty nice and should be very low effort to implement.
 [2004-12-14 09:50 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2004-12-14 17:28 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2004-12-14 22:02 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2004-12-14 22:14 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2004-12-15 00:26 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2004-12-15 06:55 UTC] ruempler at topconcepts dot com
Justin, thank you very much!