Example #1
0
 /**
  * Return content for the <tbody> part of the table.
  *
  * @return string  One or more <tr>...</tr>
  */
 public function getTableBody()
 {
     if (!$this->processed) {
         $this->process();
     }
     $rows = $this->rowdata;
     $rowsHtml = '';
     // make the row template
     if ($this->settings['editable']) {
         $oRow = new uiSelectTableRow();
         $rowsHtml = $rowsHtml . $this->getTableRow($oRow, true);
     }
     // make the data rows
     foreach ($rows as $row) {
         $oRow = new uiSelectTableRow();
         $oRow->setRowData($row);
         $this->binding->filterDisplayData($oRow);
         $rowsHtml = $rowsHtml . $this->getTableRow($oRow, false);
     }
     // add new rows that couldn't be saved
     foreach ($this->newRows as $row_id => $v) {
         $oRow = new uiSelectTableRow();
         $row = $this->postRowData[$row_id];
         $oRow->setRowData($row);
         $rowsHtml = $rowsHtml . $this->getTableRow($oRow, false);
     }
     return $rowsHtml;
 }