From 4f968c045e0d09ab3e4f659743effb5305a963ce Mon Sep 17 00:00:00 2001 From: wei <> Date: Fri, 30 Mar 2007 05:04:30 +0000 Subject: Fixed #507 and update other active controls. --- framework/Web/UI/ActiveControls/TActiveCustomValidator.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'framework/Web/UI/ActiveControls/TActiveCustomValidator.php') diff --git a/framework/Web/UI/ActiveControls/TActiveCustomValidator.php b/framework/Web/UI/ActiveControls/TActiveCustomValidator.php index 1668b54f..ad0dd51e 100644 --- a/framework/Web/UI/ActiveControls/TActiveCustomValidator.php +++ b/framework/Web/UI/ActiveControls/TActiveCustomValidator.php @@ -128,7 +128,7 @@ class TActiveCustomValidator extends TCustomValidator * Sets the text for the error message. Updates client-side erorr message. * @param string the error message */ - public function setErrorMessage($value) + public function setErrorMessage($value) { parent::setErrorMessage($value); if($this->getActiveControl()->canUpdateClientSide()) @@ -139,13 +139,14 @@ class TActiveCustomValidator extends TCustomValidator } } - /** - * Register the javascript for the active custom validator. + /** + * Ensure that the ID attribute is rendered and registers the javascript code + * for initializing the active control. */ - protected function registerClientScriptValidator() + protected function addAttributesToRender($writer) { - $this->getActiveControl()->registerCallbackClientScript( - $this->getClientClassName(), $this->getClientScriptOptions()); + parent::addAttributesToRender($writer); + TBaseValidator::registerClientScriptValidator(); } /** -- cgit v1.2.3