From ace9c57b1c50709bbe8085e9cf99161a4c574be2 Mon Sep 17 00:00:00 2001
From: wei <>
Date: Sun, 28 Jan 2007 01:22:37 +0000
Subject: Fixed TActiveListBox bug. Add more meta for active record. Fix
TCallback docs.
---
framework/Web/UI/ActiveControls/TBaseActiveControl.php | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
(limited to 'framework/Web/UI/ActiveControls/TBaseActiveControl.php')
diff --git a/framework/Web/UI/ActiveControls/TBaseActiveControl.php b/framework/Web/UI/ActiveControls/TBaseActiveControl.php
index 000e896f..ebd9d168 100644
--- a/framework/Web/UI/ActiveControls/TBaseActiveControl.php
+++ b/framework/Web/UI/ActiveControls/TBaseActiveControl.php
@@ -360,10 +360,17 @@ class TBaseActiveCallbackControl extends TBaseActiveControl
* request for this control call the dispatch() method on the
* request instance. Example code in javascript
*
- * request = <%= $this->mycallback->ActiveControl->Javascript %>;
+ * var request = <%= $this->mycallback->ActiveControl->Javascript %>;
* request.setParameter('hello');
* request.dispatch(); //make the callback request.
*
+ *
+ * Alternatively,
+ *
+ * //dispatches immediately
+ * Prado.Callback("<%= $this->mycallback->UniqueID %>",
+ * $this->mycallback->ActiveControl->JsCallbackOptions);
+ *
* @return string javascript client-side callback request object (javascript
* code)
*/
@@ -372,6 +379,14 @@ class TBaseActiveCallbackControl extends TBaseActiveControl
$client = $this->getPage()->getClientScript();
return $client->getCallbackReference($this->getControl(),$this->getClientSideOptions());
}
+
+ /**
+ * @param string callback requestion options as javascript code.
+ */
+ public function getJsCallbackOptions()
+ {
+ return TJavascript::encode($this->getClientSideOptions());
+ }
}
?>
\ No newline at end of file
--
cgit v1.2.3