From 0ccf3763474a18b72b6a166399fc1cf569b867f8 Mon Sep 17 00:00:00 2001
From: wei <>
Date: Sat, 23 Sep 2006 00:05:08 +0000
Subject: Fixed #389 and add OnPreDispatch for TCallbackClientSide
---
framework/Web/UI/ActiveControls/TCallbackClientSide.php | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
(limited to 'framework/Web/UI/ActiveControls/TCallbackClientSide.php')
diff --git a/framework/Web/UI/ActiveControls/TCallbackClientSide.php b/framework/Web/UI/ActiveControls/TCallbackClientSide.php
index ac5e32c8..ff347659 100644
--- a/framework/Web/UI/ActiveControls/TCallbackClientSide.php
+++ b/framework/Web/UI/ActiveControls/TCallbackClientSide.php
@@ -16,6 +16,7 @@
* The following client side events are executing in order if the callback
* request and response are send and received successfuly.
*
+ * - onPreDispatch executed before a request is dispatched.
* - onUninitialized executed when callback request is uninitialized.
* - onLoading executed when callback request is initiated
* - onLoaded executed when callback request begins.
@@ -59,6 +60,22 @@ class TCallbackClientSide extends TClientSideOptions
return "function(sender, parameter){ {$javascript} }";
}
+ /**
+ * @param string javascript code to be executed before a request is dispatched.
+ */
+ public function setOnPreDispatch($javascript)
+ {
+ $this->setFunction('onPreDispatch', $javascript);
+ }
+
+ /**
+ * @return string javascript code to be executed before a request is dispatched.
+ */
+ public function getOnPreDispatch()
+ {
+ return $this->getOption('onPreDispatch');
+ }
+
/**
* @return string javascript code for client-side onUninitialized event
*/
--
cgit v1.2.3