Missing Multi2 column + debug tips + modify dbObject by task [message #3263] |
Sun, 30 December 2012 20:57 |
markcarranza
Messages: 14 Registered: December 2012 Location: San Francisco, CA, USA
|
Junior Member |
|
|
I'm using the Radicore data dictionary to document legacy data. I added a 'col_rename' column to dict_column, and a 'Rename Column' Multi2 task to edit documentation of all a table's columns on the same screen.
Screen structure file attached.
Problem: The 'is_required' column is blank: <td> </td>.
Behavior: If I force an error, for example, leaving 'description' blank and submit, the proper 'is_required' dropdown shows(!) and edits to this column save (when 'description' filled in) on submit, but then go back to blank.
I traced the code, but don't know the system well enough to see something wrong yet.
I found: $_SESSION['log_xml_document'] = true;
1) Link please: where are debug tips documented?
so:
<is_required required="y" control="dropdown" optionlist="is_required" nodisplay="y">**hidden**</is_required>
But a breakpoint in dict_column.class.inc _cm_checkColumnType line 98
if (isset($colspecs['is_required'])) {
doesn't get hit(?)
I searched for _cm_checkColumnType in RADICORE for PHP - Functions, Methods and Variables, and not finding it there, went back and found it in dict_column.class.inc
2) would it make sense to have a naming convention for private(?) class methods different from foundation '_cm_...' methods?
So now I see: _cm_post_getData
//...
// just comment out for now
// $this->fieldspec['is_required']['nodisplay'] = 'y';
//...
if (count($rowdata) == 1) {
$rowdata[0] = $this->_cm_checkColumnType($rowdata[0]);
} // if
3) Link please: where is it covered how best to modify dbObject behavior by task?
4) How best to do this? Can I edit $this->fieldspec in a screen.inc file? Suggestions welcome. Thanks!
[Updated on: Sun, 30 December 2012 21:05] Report message to a moderator
|
|
|
Re: Missing Multi2 column + debug tips + modify dbObject by task [message #3264 is a reply to message #3263] |
Sun, 30 December 2012 21:02 |
markcarranza
Messages: 14 Registered: December 2012 Location: San Francisco, CA, USA
|
Junior Member |
|
|
I can't seem to upload the file here, so:<?php
$structure['xsl_file'] = 'std.list2.xsl';
$structure['tables']['outer'] = 'dict_table';
// identify the column specs - may use 'width' or 'class'
$structure['outer']['columns'][] = array('width' => '25%');
$structure['outer']['columns'][] = array('width' => '*');
// identify the field names and their screen labels
$structure['outer']['fields'][] = array('database_id' => 'Database Id');
$structure['outer']['fields'][] = array('table_id' => 'Table Id');
$structure['outer']['fields'][] = array('table_desc' => 'Table Description');
$structure['outer']['fields'][] = array('tbl_comment' => 'Comment');
$structure['tables']['inner'] = 'dict_column';
// identify the column specs - may use 'width' or 'class'
$structure['inner']['columns'][] = array('width' => 5);
$structure['inner']['columns'][] = array('width' => 10, 'align' => 'right');
$structure['inner']['columns'][] = array('width' => 10, 'nowrap' => 'nowrap');
$structure['inner']['columns'][] = array('width' => 20);
$structure['inner']['columns'][] = array('width' => 40);
$structure['inner']['columns'][] = array('width' => '*');
$structure['inner']['columns'][] = array('width' => 20);
// identify the field names and their screen labels
$structure['inner']['fields'][] = array('selectbox' => 'Select');
$structure['inner']['fields'][] = array('column_seq' => '#');
$structure['inner']['fields'][] = array('column_id' => 'Name');
$structure['inner']['fields'][] = array('col_rename' => 'Rename', 'size' => 20);
$structure['inner']['fields'][] = array('column_desc' => 'Description', 'size' => 40, 'nosort' => 'y');
$structure['inner']['fields'][] = array('col_comment' => 'Comment', 'cols' => 40, 'rows' => 2, 'nosort' => 'y');
$structure['inner']['fields'][] = array('is_required' => 'Is Required', 'nosort' => 'y');
// uncomment to get debug XML in /xsl directory
// $_SESSION['log_xml_document'] = true;
|
|
|
|