Zii Tabs and widgets within them

Hi, still getting to grips with Yii. I’m using CJuiTabs and within the tab I have a chart widget. When the page loads it’s fine and generates the chart widget. I’m just using the ajax approach that’s shown in the demo i.e.

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

'tabs'=>array(


    'StaticTab 1'=>'Content for tab 1',


    'StaticTab 2'=>array('content'=>'Content for tab 2', 'id'=>'tab2'),


    // panel 3 contains the content rendered by a partial view


    'AjaxTab'=>array('ajax'=>$ajaxUrl),


),


// additional javascript options for the tabs plugin


'options'=>array(


    'collapsible'=>true,


),

));

However, If I click on another tab and then back the chart widget disappears. It seems to step though the code again but doesn’t show on the page. Any ideas what could be causing this?

Also on the subject of Modules should they be entirely self contained? Say for example a site has an area dedicated to consumers and another section dedicated to manufacturers. I was tempted to use a module for each but they will both need to use common models (e.g. product models) so maybe I should take a different approach? Say using RBAC to restrict the areas but have all together.

Thanks

I didn’t try tabs with ajax, but this works




'tab' => $this->renderPartial('aView', $data, true)