summaryrefslogtreecommitdiff
path: root/framework/Web/UI/ActiveControls/TBaseActiveControl.php
diff options
context:
space:
mode:
Diffstat (limited to 'framework/Web/UI/ActiveControls/TBaseActiveControl.php')
-rw-r--r--framework/Web/UI/ActiveControls/TBaseActiveControl.php17
1 files changed, 16 insertions, 1 deletions
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 <tt>dispatch()</tt> method on the
* request instance. Example code in javascript
* <code>
- * request = <%= $this->mycallback->ActiveControl->Javascript %>;
+ * var request = <%= $this->mycallback->ActiveControl->Javascript %>;
* request.setParameter('hello');
* request.dispatch(); //make the callback request.
* </code>
+ *
+ * Alternatively,
+ * <code>
+ * //dispatches immediately
+ * Prado.Callback("<%= $this->mycallback->UniqueID %>",
+ * $this->mycallback->ActiveControl->JsCallbackOptions);
+ * </code>
* @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