protected function renderCustomScriptFile($writer)
{
if (($scriptUrl = $this->getScriptUrl()) !== '') {
if ($this->getPage()->getIsCallback()) {
$cs = $this->getPage()->getClientScript();
$uniqueid = $this->ClientID . '_custom';
if (!$cs->isScriptFileRegistered($uniqueid)) {
$cs->registerScriptFile($uniqueid, $scriptUrl);
}
} else {
$writer->write("<script type=\"text/javascript\" src=\"{$scriptUrl}\"></script>\n");
}
}
}