private function getWidgetScript($callback)
 {
     Yii::app()->clientScript->scripts = array();
     ob_start();
     $widget = new CAutoComplete(null);
     $widget->name = 'test';
     $widget->highlight = $callback;
     $widget->data = array(1, 2, 3);
     $widget->init();
     $widget->run();
     Yii::app()->clientScript->render($out);
     ob_end_clean();
     return $out;
 }
 public function run()
 {
     parent::run();
     if (!empty($this->value)) {
         echo CHtml::htmlButton($this->controller->getActionLabel('cross', false), array('type' => 'submit', 'alt' => 'Remove filter', 'title' => 'Remove filter', 'onclick' => 'jQuery("#' . $this->id . '").val("")'));
     }
 }
 public function init()
 {
     $this->url = $this->getController()->createUrl($this->getController()->getId() . '/' . CategoryAutoCompleteWidget::PREFIX . CategoryAutoCompleteWidget::LIKE_ACTION);
     parent::init();
 }