Пример #1
0
function &onAddRow($mData, $mConfiguration)
{
    // $mData contains an array with three elements
    // if $mConfiguration has only 1 element, then
    // this is a request for a header row
    // else a request for a body row
    $objTableRow = new clsTr();
    if (1 == count($mConfiguration)) {
        $objTableRow->setEvent_AddCell('onAddColumn');
        $objTableRow->addChild(new clsTd());
        $objTableRow->addCells($mData, $mConfiguration);
    } else {
        $row = generateUniqueID();
        $row = "row_" . $row;
        $objTableRow->setAttribute('id', $row);
        $objTableRow->setEvent_AddCell('onAddCell');
        $objTableRow->addChild(new clsTd(array('child' => new clsAnchor(array('event' => array('onclick', $mConfiguration['row'], array(array(0, XAJAX_QUOTED_VALUE, $row))), 'child' => new clsLiteral('select >>'))))));
        $objTableRow->addCells($mData, $mConfiguration);
    }
    return $objTableRow;
}
Пример #2
0
 function &_onAddRow($aCells, $mConfiguration = null)
 {
     $objTableRow = new clsTr();
     if (null != $this->eventAddRowCell) {
         $objTableRow->setEvent_AddCell($this->eventAddRowCell);
     }
     $objTableRow->addCells($aCells, $mConfiguration);
     return $objTableRow;
 }