framework/web/widgets/CTreeView.php
public function init()
	{
		if(isset($this->htmlOptions['id']))
			$id=$this->htmlOptions['id'];
		else
			$id=$this->htmlOptions['id']=$this->getId();
		if($this->url!==null)
			$this->url=CHtml::normalizeUrl($this->url);
		$cs=Yii::app()->getClientScript();
		$cs->registerCoreScript('treeview');
		$options=$this->getClientOptions();
		$options=$options===array()?'{}' : CJavaScript::encode($options);
		$cs->registerScript('Yii.CTreeView#'.$id,"jQuery(\"#{$id}\").treeview($options);");
		if($this->cssFile===null)
			$cs->registerCssFile($cs->getCoreScriptUrl().'/treeview/jquery.treeview.css');
		elseif($this->cssFile!==false)
			$cs->registerCssFile($this->cssFile);

		echo CHtml::tag('ul',$this->htmlOptions,false,false)."\n";
		echo self::saveDataAsHtml($this->data);
	}
public function init()
	{
		if(isset($this->htmlOptions['id']))
			$id=$this->htmlOptions['id'];
		else
			$id=$this->htmlOptions['id']=$this->getId();
		if($this->url!==null)
			$this->url=CHtml::normalizeUrl($this->url);
		$cs=Yii::app()->getClientScript();
		$cs->registerCoreScript('treeview');
		$options=$this->getClientOptions();
		$options=$options===array()?'{}' : CJavaScript::encode($options);
		$cs->registerScript('Yii.CTreeView#'.$id,"jQuery(\"#{$id}\").treeview($options);");
		if($this->cssFile===null)
			$cs->registerCssFile($cs->getCoreScriptUrl().'/treeview/jquery.treeview.css');
		elseif($this->cssFile!==false)
			$cs->registerCssFile($this->cssFile);

		echo CHtml::tag('ul',$this->htmlOptions,false,false)."\n";
		echo self::saveDataAsHtml($this->data);
	}
public function init ( ) { if ( isset ( $ this -> htmlOptions [ 'id' ] ) ) $ id = $ this -> htmlOptions [ 'id' ] ; else $ id = $ this -> htmlOptions [ 'id' ] = $ this -> getId ( ) ; if ( $ this -> url !== null ) $ this -> url = CHtml :: normalizeUrl ( $ this -> url ) ; $ cs = Yii :: app ( ) -> getClientScript ( ) ; $ cs -> registerCoreScript ( 'treeview' ) ; $ options = $ this -> getClientOptions ( ) ; $ options = $ options === array ( ) ? '{}' : CJavaScript :: encode ( $ options ) ; $ cs -> registerScript ( 'Yii.CTreeView#' . $ id , "jQuery(\"#{$id}\").treeview($options);" ) ; if ( $ this -> cssFile === null ) $ cs -> registerCssFile ( $ cs -> getCoreScriptUrl ( ) . '/treeview/jquery.treeview.css' ) ; elseif ( $ this -> cssFile !== false ) $ cs -> registerCssFile ( $ this -> cssFile ) ; echo CHtml :: tag ( 'ul' , $ this -> htmlOptions , false , false ) . "\n" ; echo self :: saveDataAsHtml ( $ this -> data ) ; }
Initializes the widget.
This method registers all needed client scripts and renders
the tree view content.
Initializes the widget . This method registers all needed client scripts and renders the tree view content .