public function actionAutocomplete($term = '') { $res = Item::AutoComplete($term); echo CJSON::encode($res); Yii::app()->end(); //*/ }