protected function replace($element, $content, $self)
{
if ($content instanceof TControl) {
$boundary = $this->getRenderedContentBoundary($content);
$content = null;
} else {
if ($content instanceof THtmlWriter) {
$boundary = $this->getResponseContentBoundary($content);
$content = null;
} else {
$boundary = null;
}
}
$this->callClientFunction('Prado.Element.replace', array($element, $content, $boundary, $self));
}