framework/web/widgets/CAutoComplete.php
public function init()
	{
		list($name,$id)=$this->resolveNameID();
		if(isset($this->htmlOptions['id']))
			$id=$this->htmlOptions['id'];
		else
			$this->htmlOptions['id']=$id;
		if(isset($this->htmlOptions['name']))
			$name=$this->htmlOptions['name'];

		$this->registerClientScript();

		if($this->hasModel())
		{
			$field=$this->textArea ? 'activeTextArea' : 'activeTextField';
			echo CHtml::$field($this->model,$this->attribute,$this->htmlOptions);
		}
		else
		{
			$field=$this->textArea ? 'textArea' : 'textField';
			echo CHtml::$field($name,$this->value,$this->htmlOptions);
		}
	}
public function init()
	{
		list($name,$id)=$this->resolveNameID();
		if(isset($this->htmlOptions['id']))
			$id=$this->htmlOptions['id'];
		else
			$this->htmlOptions['id']=$id;
		if(isset($this->htmlOptions['name']))
			$name=$this->htmlOptions['name'];

		$this->registerClientScript();

		if($this->hasModel())
		{
			$field=$this->textArea ? 'activeTextArea' : 'activeTextField';
			echo CHtml::$field($this->model,$this->attribute,$this->htmlOptions);
		}
		else
		{
			$field=$this->textArea ? 'textArea' : 'textField';
			echo CHtml::$field($name,$this->value,$this->htmlOptions);
		}
	}
public function init ( ) { list ( $ name , $ id ) = $ this -> resolveNameID ( ) ; if ( isset ( $ this -> htmlOptions [ 'id' ] ) ) $ id = $ this -> htmlOptions [ 'id' ] ; else $ this -> htmlOptions [ 'id' ] = $ id ; if ( isset ( $ this -> htmlOptions [ 'name' ] ) ) $ name = $ this -> htmlOptions [ 'name' ] ; $ this -> registerClientScript ( ) ; if ( $ this -> hasModel ( ) ) { $ field = $ this -> textArea ? 'activeTextArea' : 'activeTextField' ; echo CHtml :: $ field ( $ this -> model , $ this -> attribute , $ this -> htmlOptions ) ; } else { $ field = $ this -> textArea ? 'textArea' : 'textField' ; echo CHtml :: $ field ( $ name , $ this -> value , $ this -> htmlOptions ) ; } }
Initializes the widget.
This method registers all needed client scripts and renders
the autocomplete input.
Initializes the widget . This method registers all needed client scripts and renders the autocomplete input .