diff options
author | wei <> | 2006-05-02 08:28:17 +0000 |
---|---|---|
committer | wei <> | 2006-05-02 08:28:17 +0000 |
commit | d255f4d0e332740b3984e21ce3f7a4a4f1968ba3 (patch) | |
tree | 84bf54643e3a188330f6b7b5043efeed1aa44b6e /framework/Web/UI/TClientScriptManager.php | |
parent | c5983c0440913cd67f3744c7dda3c3bfc7eee0ed (diff) |
Adding more work on ActiveControls.
Diffstat (limited to 'framework/Web/UI/TClientScriptManager.php')
-rw-r--r-- | framework/Web/UI/TClientScriptManager.php | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/framework/Web/UI/TClientScriptManager.php b/framework/Web/UI/TClientScriptManager.php index 94ef19b6..46203b0b 100644 --- a/framework/Web/UI/TClientScriptManager.php +++ b/framework/Web/UI/TClientScriptManager.php @@ -164,6 +164,21 @@ class TClientScriptManager extends TApplicationComponent } } + public function getCallbackReference($callbackHandler, $options=null) + { + $options = !is_array($options) ? array() : $options; + $class = new TReflectionClass($callbackHandler); + if($class->hasMethod('getClientSide')) + { + $clientSide = $callbackHandler->getClientSide(); + $options = array_merge($options, $clientSide->getOptions()->toArray()); + } + $optionString = TJavascript::encode($options); + $this->registerPradoScriptInternal('ajax'); + $id = $callbackHandler->getUniqueID(); + return "new Prado.CallbackRequest('{$id}',{$optionString})"; + } + /** * Registers postback javascript for a control. * @param string javascript class responsible for the control being registered for postback |