diff options
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);
+ }
+}
+?>
|