summaryrefslogtreecommitdiff
path: root/framework/Web/UI/ActiveControls/TActiveControlAdapter.php
blob: 187b2cac999c9c48053acec1e26bd2d07386d50a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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);
	}	
} 
?>