Home » RADICORE » How To » std.list3 problem
std.list3 problem [message #360] |
Mon, 06 November 2006 03:28  |
johandewit
Messages: 25 Registered: May 2006 Location: Belgium
|
Junior Member |
|
|
Hi,
Using the list3 pattern, the parent part is not displayed.
The xml file seems ok, all data is there for the three tables.
Tables involved :
user
input, both for child and parent.
Parent - displays user related data
Child - displays week related data
Grandchild - diplays lines relevant for the selected week.
The std.list3 pattern is used without a prvious form, so I don't have a $selection criteria. The user data I want to display is that of the user logged in the system.
I think i solved this by generating a $where string in the _cm_initialize() function of my user class.
function _cm_initialise($where)
{
if ( $GLOBALS['task_id'] == 'ts_in_input(list3)' )
{
if (empty($where))
{
if (!empty($_SESSION['logon_user_id'])) {
$where = 'log = "' . strtolower($_SESSION['logon_user_id']) . '"';
if ($this->getCount($where) == 1 )
{
// create a new object, to keep this ine clean.
$tmp_object=new $this->tablename;
$fieldarray = $tmp_object->getData_raw($where);
$where_array= $tmp_object->getPkeyArray($fieldarray);
$where = array2where($where_array);
} else {
$where= NULL; // not a regular user
}
}
}
}
return $where;
}
The child part is an extended class of the input class, which contains all inputted data. It calculates some week related fields.
The grandchild then displays the data entered by the user for the selected week, but is empty at the moment.
I suspect I have to set some properties in the user class, but just don't know which one.
Meanly that's why i used another user object, to keep the current one clean, and I only creates the where string, just to avoid to set everything by hand for the user instance.
I included the generetated xml file.
Is there a way in radicore to test an xmkl file, so one can change this file by hand to discover which setting causes the touble ?
greetings
|
|
|
|
Re: std.list3 problem [message #362 is a reply to message #361] |
Mon, 06 November 2006 08:30   |
AJM
Messages: 2382 Registered: April 2006 Location: Surrey, UK
|
Senior Member |
|
|
The XSL stylesheet is looking for elements in the XML document with the identity of "aasa_user.user" which do not exist. They have the name "user" instead. I cannot understand why this is happening.
If you look in file include.xml.php4.inc you will see in function addData2XMLdoc() a call to $dbobject->getClassName() which provides the element identity for writing data from that object out to the XL document. The getClassName() function exists within file std.table.class.inc.
Can you step through with your debugger and see what is happening at that point?
[Updated on: Mon, 06 November 2006 08:30] Report message to a moderator
|
|
|
|
|
|
Goto Forum:
Current Time: Sat Jun 21 11:37:31 EDT 2025
Total time taken to generate the page: 0.01207 seconds
|