From 57832028ea4380f2c185c18d857d2c6b7682e763 Mon Sep 17 00:00:00 2001 From: "ctrlaltca@gmail.com" <> Date: Wed, 21 Dec 2011 15:19:37 +0000 Subject: fix for #91; fixed TActiveCustomvalidator's behaviour and demo (more discussion in the ticket) --- framework/Web/UI/ActiveControls/TActiveCustomValidator.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (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 80d2f522..e0884c55 100644 --- a/framework/Web/UI/ActiveControls/TActiveCustomValidator.php +++ b/framework/Web/UI/ActiveControls/TActiveCustomValidator.php @@ -101,6 +101,20 @@ class TActiveCustomValidator extends TCustomValidator $this->onCallback($param); } + /** + * @param boolean whether the value is valid; this method will trigger a clientside update if needed + */ + public function setIsValid($value) + { + parent::setIsValid($value); + if($this->getActiveControl()->canUpdateClientSide()) + { + $client = $this->getPage()->getCallbackClient(); + $func = 'Prado.Validation.updateActiveCustomValidator'; + $client->callClientFunction($func, array($this, $value)); + } + } + /** * This method is invoked when a callback is requested. The method raises * 'OnCallback' event to fire up the event handlers. If you override this -- cgit v1.2.3