public function render($writer)
{
if ($this->getHasPreRendered()) {
parent::render($writer);
if ($this->getActiveControl()->canUpdateClientSide()) {
$this->getPage()->getCallbackClient()->replaceContent($this, $writer);
}
} else {
$this->getPage()->getAdapter()->registerControlToRender($this, $writer);
// If we update a TActiveTableRow on callback, we shouldn't update all childs,
// because the whole content will be replaced by the parent.
if ($this->getHasControls()) {
foreach ($this->findControlsByType('IActiveControl', false) as $control) {
$control->getActiveControl()->setEnableUpdate(false);
}
}
}
}