CJuiAutoComplete not working

Im new here in the forum, and also new to yii… So hello everyone!

I have a issue with the autocomplete widget…
I create a action in my controller to display sugestions of titles when Im typing in the field, then I add the code to teh view, but nothing happens, no sugestions… Sometimes appears a jquery error…


public function actionGetTitles($term) {
        $model = Node::model()->findAll(
                    'select' => 'title',
                    'condition' => 'title LIKE :string',
                    'params' => array(
                        ':string' => $term . '%',
        foreach ($model as $modelos) {
            $json_array[] = $modelos->title;
        $json = CJSON::encode($json_array);
        echo $json;


<div class="row">
                                    <div class="col-lg-12">

                                        <?php echo CHtml::label('Pesquisar Titulo', 'search'); ?><br />
                                        <?php $this->widget('zii.widgets.jui.CJuiAutoComplete', array(
                                          'name' => 'search',
                                          // additional javascript options for the autocomplete plugin
                                          'options' => array(
                                          'showAnim' => 'fold',
                                          'htmlOptions' => array(
                                          'class' => 'form-control',

Best regards!