Display Jui Autosuggest In Cgridview

Hi, i am using JUI autosuggest in CGridView.

Here is the code





$this->widget('zii.widgets.grid.CGridView', array(

	'id'=>'ebay-imei-grid',

	'dataProvider'=>$model->search(),

	'filter'=>$model,

	'columns'=>array(

		array(

			'header' 	=> 	'',

			'name'		=>	'id',

			'class'		=>	'CCheckBoxColumn',

			'id' => 'selectedIds',

			'selectableRows' => '50',

		),


		array(

				'header' 	=> 	'Vendor',

				'name'		=>	'rma_number',

				'value'		=>	function($data){ $this->widget('zii.widgets.jui.CJuiAutoComplete',array(

									    	"name"=>"SalesReturn[prod_vendor$data->id]",

											"value"	=>	RepairInfo::model()->getRepairVendor($data->id, "name"),

										    "sourceUrl"	=>	array("Profiler/GetVendor"),

											"attribute"=>"imei",

										    // additional javascript options for the autocomplete plugin

										    "options"=>array(

										        "minLength"=>"3",

										    ),

										    "htmlOptions"=>array(

										        "style"=>"height:20px;",

										    ),

											"options"=>array(

													"showAnim"=>"fold",

													"select"=>"js:function(event, ui) {

											                                          $(\"#vendor$data->id\").val(ui.item.id);

							 }"

											),

									)); 

									echo CHtml::hiddenField("vendor$data->id", RepairInfo::model()->getRepairVendor($data->id, "id"), array("id" => "vendor$data->id", "name" => "vendor$data->id") );

									}, 

				'type'		=>	'raw',

		),

	),


)); ?>



The problem is, it is working perfect on localhost but when i deploy it on server it generates error

"Fatal error: Using $this when not in object context in /project/file.php on line 161"

Please guide me, what is wrong with the code?

Hi,

Please remove this widget and try other simple widget. First confirm whether widget problem or some other problem.

Seems that you can accessing a static method in your code which uses $this

thanks for you reply.

I am unable to understand, how it is working on localhost?

I have deployed (model, controller, view) but it is not working on server…

share the code of /project/file.php