public function buildDashboard() { $table = new TableComponent('table1'); $table->setCaption("Movies & Ratings"); $table->setDimensions(6, 6); $table->setRowsPerPage(8); $table->addColumn('rank', "Rank"); $table->addColumn('title', "Title"); $table->addColumn('rating', "Rating"); $table->addMultipleRows($this->rows); // Adding multiple rows at once $filter = new FormComponent('form'); $filter->setCaption('Filter'); $filter->setDimensions(5, 3); $filter->addSelectField('rating_filter', 'Rating Greater Than', array(5, 6, 7, 8, 9)); $filter->onApplyClick(array($table), 'handleApplyClick', $this); $this->addComponent($table); $this->addComponent($filter); }
public function buildDashboard() { $table = new TableComponent('table1'); $table->setCaption("List of Employees"); $table->setDimensions(6, 6); $employees = $this->getEmployees(); $table->addColumn('FirstName', "First Name"); $table->addColumn('LastName', "Last Name"); $table->addColumn('City', "City"); $table->addColumn('State', "State", array('textItalicFlag' => true)); $table->addColumn('Country', "Country"); $table->addMultipleRows($this->populateData($employees)); $this->addComponent($table); $form = new FormComponent('form1'); $form->setCaption("Form Employees"); $form->setDimensions(4, 4); $form->addTextField("contains", "City Contains"); $form->onApplyClick(array($table), "handleEmployeesSubmit", $this); $this->addComponent($form); }