Ajaxlinks Inside Of Ctreeview


I would like to create ajaxlinks inside of ctreeview, but I couldn’t load any content from this links (nothing happens in firebug nets section). Could you give me any tips why not?

index view:

<div id="leftContent">


    $this->widget('CTreeView', array(

        'id' => 'tree',

        'url' => array('ajaxFillTree'),




<div id="rightContent">

    <?php echo 'This is rightContent what i would like to update'; ?>


ajaxFillTree action:

public function actionAjaxFillTree() {


        $children = $req->queryAll();

        $treedata = array();

        foreach ($children as $child) {


            if (isset($_GET['root']) && $_GET['root'] !== 'source') {

                $nodeText .= $this->createAjaxLink($id, $child['text'], $type);




        echo str_replace(

                '"hasChildren":"0"', '"hasChildren":false', CTreeView::saveDataAsJson($treedata)




create ajax links in this function:

private function createAjaxLink($id, $text, $type) {

        $uniqid = 'send-link-' . uniqid();

        $ajaxLink = CHtml::ajaxLink(


			Yii::app()->createUrl(Yii::app()->controller->id . '/mtAjaxRequest'),

                        // ajaxOptions


		            'type' => 'GET',

		            'update' => '#rightContent',

		            'success' => 'function(data){alert(data);}',

		            'data' => array('id' => $uniqid),



                        array('id' => $uniqid)


        return $ajaxLink;


mtAjaxRequest action:

public function actionMtAjaxRequest($id) {

        $this->renderPartial('_ajaxContent', array('id' => $id), false, true);


and the ajaxcontent what i want to render:


echo 'Uniqid is: ' . $id;


Does somebody find the answer to this question?

I feel same the way.

I tried work with Ctreeview on Ajax Url, but doesn’t work.

I guess the problem is Jquery Version and file Treeview-async.js