From 7e002c23edc5fb5db70935591aa6adeda25fc7fb Mon Sep 17 00:00:00 2001 From: xue <> Date: Sun, 2 Jul 2006 18:05:42 +0000 Subject: Merge from 3.0 branch till 1224. --- framework/Web/UI/WebControls/TBaseValidator.php | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) (limited to 'framework/Web/UI/WebControls/TBaseValidator.php') diff --git a/framework/Web/UI/WebControls/TBaseValidator.php b/framework/Web/UI/WebControls/TBaseValidator.php index a0801d4c..9366de62 100644 --- a/framework/Web/UI/WebControls/TBaseValidator.php +++ b/framework/Web/UI/WebControls/TBaseValidator.php @@ -124,7 +124,7 @@ abstract class TBaseValidator extends TLabel implements IValidator } /** - * Adds attributes to renderer. Calls parent implementation and renders the + * Adds attributes to renderer. Calls parent implementation and renders the * client control scripts. * @param THtmlWriter the renderer */ @@ -237,7 +237,7 @@ abstract class TBaseValidator extends TLabel implements IValidator $this->registerClientScriptValidator(); $this->updateControlCssClass(); } - + /** * Update the ControlToValidate component's css class depending * if the ControlCssClass property is set, and whether this is valid. @@ -634,6 +634,25 @@ class TClientSideValidatorOptions extends TClientSideOptions return $this->getOption('OnError'); } + /** + * @param boolean true to revalidate when the control to validate changes value. + */ + public function setObserveChanges($value) + { + $this->setOption('ObserveChanges', TPropertyValue::ensureBoolean($value)); + } + + /** + * @return boolean true to observe changes. + */ + public function getObserveChanges() + { + if(($option=$this->getOption('ObserveChanges'))!==null) + return $option; + else + return true; + } + /** * Ensure the string is a valid javascript function. If the string begins * with "javascript:" valid javascript function is assumed, otherwise the -- cgit v1.2.3