Re: Access non key data from parent table [message #1634 is a reply to message #1633] |
Thu, 11 September 2008 11:54 |
AJM
Messages: 2368 Registered: April 2006 Location: Surrey, UK
|
Senior Member |
|
|
This is where you really ought to be using a debugger to see exactly what is going on instead of making wild guesses.
When you are in a LIST2 task, make one or more selections in the INNER (child) area and then press a navigation button, this is what happens:
(1) The LIST2 controller calls the childForm() function.
(2) This function detects that $_POST['select'] is not empty, so it calls the getPkeyArray() method on the INNER object.
(3) This function calls $object->getPkeyNames() to get the list of primary key felds as defined in the data dictionary.
(4) It then calls $object->_cm_getPkeyNames() to allow this list of field names to be customised.
(5) It then loops through $object->fieldarray, and for every row which was selected it constructs an associative array using the list of field names obtained previously.
(6) This associative array is then converted into a string which is passed to the task associated with the navigation button.
If your _cm_getPkeyNames() method is not being called then have you checked that you put it in the right class?
Tony Marston
http://www.tonymarston.net
http://www.radicore.org
|
|
|