diff options
author | wei <> | 2006-04-30 00:15:23 +0000 |
---|---|---|
committer | wei <> | 2006-04-30 00:15:23 +0000 |
commit | 10b65d6d03ee0afc1ec1a50f320af42a79f5492b (patch) | |
tree | d6b8167e0d224f21db6a16da251ba4d069468543 /framework/Web/UI/ActiveControls/TActiveControlAdapter.php | |
parent | 2cc93773feb5e76d2dd002b1dcd463a01d606794 (diff) |
Adding Callback foundations.
Diffstat (limited to 'framework/Web/UI/ActiveControls/TActiveControlAdapter.php')
-rw-r--r-- | framework/Web/UI/ActiveControls/TActiveControlAdapter.php | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/framework/Web/UI/ActiveControls/TActiveControlAdapter.php b/framework/Web/UI/ActiveControls/TActiveControlAdapter.php new file mode 100644 index 00000000..187b2cac --- /dev/null +++ b/framework/Web/UI/ActiveControls/TActiveControlAdapter.php @@ -0,0 +1,25 @@ +<?php
+/*
+ * Created on 29/04/2006
+ */
+
+class TActiveControlAdapter extends TControlAdapter
+{
+ private static $_renderedPosts = false;
+
+ /**
+ * Render the callback request post data loaders once only.
+ */
+ public function render($writer)
+ {
+ if(!self::$_renderedPosts)
+ {
+ $options = TJavascript::encode($this->getPage()->getPostDataLoaders(),false);
+ $script = "Prado.Callback.PostDataLoaders.concat({$options});";
+ $this->getPage()->getClientScript()->registerEndScript(get_class($this), $script);
+ self::$_renderedPosts = true;
+ }
+ parent::render($writer);
+ }
+}
+?>
|