Cjuitab Within An Ajax Called Renderpartial

Hiya all.

I have been searching the web for an answer to the issue i am having, i haven’t yet found an answer that i understand.

I have a CGridView table that has a ajaxLink that calls a controller action to update a div lower down the page.

This div then does a renderPartial that contains a CJuiTab widget.

Here’s the code:

admin.php




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

	'id'=>'accounts-list',

	'template' =>'{items}{pager}',

	'ajaxUpdate' => false,

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

	'columns' => array(

		array(

	   	'name'=>'tab',

		   'header'=>'Tab',

		   'type'=>'raw',

		   'value'=>'CHtml::ajaxLink("Tab", Yii::app()->createUrl("Accounts/UpdateAjax/", array("id"=>"$data->id")), array("update"=>"#data"))',

		   'htmlOptions'=>array('width'=>'40'),

	   ),

		array(

	   	'name'=>'id',

		   'header'=>'ID',

		   'type'=>'html',

		   'value'=>'$data->id',

		   'htmlOptions'=>array('width'=>'40'),

	   ),

		'name',

		'phone',

		'mobile',

		'type',

		'account_manager',

		'status',

		array(

			'class'=>'CButtonColumn',

		),

	),

));



The function in the accounts controller:


	

public function actionUpdateAjax($id)

	{

		if(isset($_GET['id']))

		{

			$data = $this->loadModel($id);

			$this->renderPartial('_bottom_tabs', array('data'=>$data));  

			Yii::app()->end();

		}

	}



The Div on the admin.php page:




<div id="data">

   <?php 

   if(isset($data))

   {

   	$this->renderPartial('_bottom_tabs', array('data'=>$data), true, true);

   } 

   ?>

</div>



The _bottom_tabs page:




<?php

$this->widget('zii.widgets.jui.CJuiTabs', array(

	'tabs'=>array(

		'Account Info', 'content' => $this->renderPartial('_view_acc_details', array('data'=>$data), true),			

		'Wireless' => 'Profile Content',			

		'Wireless' => 'Profile Content',

		'Tickets' => 'Messages Content',

		'Wireless' => 'Profile Content',	

		'Leads' => 'Messages Content',

		'Wireless' => 'Profile Content',

		'Wireless' => 'Profile Content',	

		'Returns' => 'Messages Content',

	),

));

?>



The issue is that the tabs aren’t rendered correctly

This is the screen shot of what it looks like:

I have tried adding true, true to the end of the partialRender, this didn’t change anything.

I believe after reading many posts on the web it is something to do with the fact that the renderPartial doesn’t execute any javascript, therefore it doesn’t render the structure of the Tabs correctly.

Any help is greatly appreciated.

Regards

Liam