protected registerClientScriptValidator ( ) |
protected function registerClientScriptValidator()
{
$key = 'prado:' . $this->getClientID();
if (!$this->getPage()->getClientScript()->isEndScriptRegistered($key)) {
$options = TJavaScript::encode($this->getClientScriptOptions());
$script = 'new ' . $this->getClientClassName() . '(' . $options . ');';
$this->getPage()->getClientScript()->registerEndScript($key, $script);
}
}
/** * Ensure that the ID attribute is rendered and registers the javascript code * for initializing the active control. */ protected function addAttributesToRender($writer) { parent::addAttributesToRender($writer); TBaseValidator::registerClientScriptValidator(); }