summaryrefslogtreecommitdiff
path: root/framework/Web/UI/WebControls
diff options
context:
space:
mode:
authorwei <>2006-10-19 00:57:08 +0000
committerwei <>2006-10-19 00:57:08 +0000
commita36595a1470db259ce9e723f2ad13b63fd5e8eb6 (patch)
tree3633aff35a82e566d5b89dcfb3c50c284ccfc9d9 /framework/Web/UI/WebControls
parentec1c561946e785fb34a4809b8b154e2e4f0ffb8b (diff)
BC BREAK: Changed Validator property names:
- Validators ClientSide.OnSuccess becomes ClientSide.OnValidationSuccess, - Validators ClientSide.OnError becomes ClientSide.OnValidationError, - Validators OnSuccess event becomes OnValidationSuccess. - Validators OnError event becomes OnValidationError.
Diffstat (limited to 'framework/Web/UI/WebControls')
-rw-r--r--framework/Web/UI/WebControls/TBaseValidator.php55
1 files changed, 45 insertions, 10 deletions
diff --git a/framework/Web/UI/WebControls/TBaseValidator.php b/framework/Web/UI/WebControls/TBaseValidator.php
index ad901e17..59af7e7f 100644
--- a/framework/Web/UI/WebControls/TBaseValidator.php
+++ b/framework/Web/UI/WebControls/TBaseValidator.php
@@ -490,12 +490,12 @@ abstract class TBaseValidator extends TLabel implements IValidator
if($this->evaluateIsValid())
{
$this->setIsValid(true);
- $this->onSuccess();
+ $this->onValidationSuccess();
}
else
{
$this->setIsValid(false);
- $this->onError();
+ $this->onValidationError();
}
}
return $this->getIsValid();
@@ -527,17 +527,17 @@ abstract class TBaseValidator extends TLabel implements IValidator
/**
* This event is raised when the validator succeeds in validation.
*/
- public function onSuccess()
+ public function onValidationSuccess()
{
- $this->raiseEvent('OnSuccess',$this,null);
+ $this->raiseEvent('OnValidationSuccess',$this,null);
}
/**
* This event is raised when the validator fails in validation.
*/
- public function onError()
+ public function onValidationError()
{
- $this->raiseEvent('OnError',$this,null);
+ $this->raiseEvent('OnValidationError',$this,null);
}
/**
@@ -616,7 +616,7 @@ class TValidatorClientSide extends TClientSideOptions
*/
public function setOnSuccess($javascript)
{
- $this->setFunction('OnSuccess', $javascript);
+ $this->setFunction('OnValidationSuccess', $javascript);
}
/**
@@ -624,7 +624,7 @@ class TValidatorClientSide extends TClientSideOptions
*/
public function getOnSuccess()
{
- return $this->getOption('OnSuccess');
+ return $this->getOption('OnValidationSuccess');
}
/**
@@ -634,7 +634,7 @@ class TValidatorClientSide extends TClientSideOptions
*/
public function setOnError($javascript)
{
- $this->setFunction('OnError', $javascript);
+ $this->setFunction('OnValidationError', $javascript);
}
/**
@@ -642,7 +642,42 @@ class TValidatorClientSide extends TClientSideOptions
*/
public function getOnError()
{
- return $this->getOption('OnError');
+ return $this->getOption('OnValidationError');
+ }
+
+
+ /**
+ * Alias for OnSuccess
+ * @param string javascript code for client-side OnSuccess event.
+ */
+ public function setOnValidationSuccess($javascript)
+ {
+ $this->setOnSuccess($javascript);
+ }
+
+ /**
+ * @return string javascript code for client-side OnSuccess event.
+ */
+ public function getOnValidationSuccess()
+ {
+ return $this->getOnSuccess();
+ }
+
+ /**
+ * Alias for OnError
+ * @param string javascript code for client-side OnError event.
+ */
+ public function setOnValidationError($javascript)
+ {
+ $this->setOnError($javascript);
+ }
+
+ /**
+ * @return string javascript code for client-side OnError event.
+ */
+ public function getOnValidationError()
+ {
+ return $this->getOnError();
}
/**