/** * Copy basic record details to the list/edit/search controls. */ public function onPreRender($param) { parent::onPreRender($param); $this->getListView()->copyFrom($this); $this->getEditView()->copyFrom($this); $this->getSearchControl()->copyFrom($this); }
/** * Loads and display the data. */ public function onPreRender($param) { parent::onPreRender($param); if (!$this->getPage()->getIsPostBack() || $this->getViewState('CurrentClass') != $this->getRecordClass()) { $this->initializeSort(); $this->setViewState('CurrentClass', $this->getRecordClass()); } $this->loadRecordData(); }
/** * Copy the view details from another scaffold view instance. * @param TScaffoldBase scaffold view. */ protected function copyFrom(TScaffoldBase $obj) { $this->_record = $obj->_record; $this->setRecordClass($obj->getRecordClass()); $this->setEnableDefaultStyle($obj->getEnableDefaultStyle()); }