Select tab in CJuiTabs with ajaxtabs.

Hi Guys,

I’ve been busy with Yii a lot and for every problem I’ve had, I’ve always found a solution somewhere.

But now I’m stuck. that is why I now need to place my first post on this forum.

I think this is a bug.

So, this is my code (more or less):




$langdata = array(

    'nl' => array('ajax'=>array('categorylang/update', 'id'=>$id, 'lid'=>'1')),

    'fr' => array('ajax'=>array('categorylang/update', 'id'=>$id, 'lid'=>'2')),

    'en' => array('ajax'=>array('categorylang/update', 'id'=>$id, 'lid'=>'3')),

    'de' => array('ajax'=>array('categorylang/update', 'id'=>$id, 'lid'=>'4')),

);


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

    'id' => 'langOptions',

    'tabs'=>$langdata,

    'options' => array(

        'selected' => 0,

    ),

));



My problem lies with the options. I want the first tab to be selected, but it always picks the last one.

I don’t have this problem with static tabs, only with ajax tabs.

Anybody who can help? Would be much appreciated.

Just tested your code and the first selected tab for me was ‘nl’, which is correct isn’t it?

Maybe the problem lies within your controller action, try it without populating the tabs and see what happens.