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
|
|
|