CJuiTabs with same model in different tab

Hello.

I have one CJuiTabs with multiple tabs.

My problem is in different tabs using the same model. In the first tab, I update the model and the second tab I create a new record in the database.

My code is:

<div class="form">

<?php

$form=$this->beginWidget(‘CActiveForm’,array(

   'id'=&gt;'default-parent-form',


   'enableAjaxValidation'=&gt;false,

));

?>

<?php

$tabs[‘Dados Pessoais’]=array(

   'id'=&gt;'DadosPessoais',


   'content'=&gt;&#036;this-&gt;renderPartial('_formPag1',array(


       'form'=&gt;&#036;form,


       'model1'=&gt;&#036;model1,


       'model2'=&gt;&#036;model2,


       'colaborador'=&gt;&#036;colaborador,


   ),


           true)

);

$tabs[‘Competências’]=array(

   'id'=&gt;'Competências',


   'content'=&gt;&#036;this-&gt;renderPartial('_formPag2',array(


       'form'=&gt;&#036;form,


       'items'=&gt;&#036;itemsCompet,


       'modelCompet'=&gt;&#036;modelCompet,


       'compet'=&gt;&#036;compet,


   ),


           true)

);

$tabs[‘Objectivos Ano Anterior’]=array(

   'id'=&gt;'ObejctivosAnoAnterior',


   'content'=&gt;&#036;this-&gt;renderPartial('_formPag3',array(


       'form'=&gt;&#036;form,


       'items'=&gt;&#036;items,


       'modelObj'=&gt;&#036;modelObj,


   ),


           true)

);

$tabs[‘Novos Objectivos’]=array(

   'id'=&gt;'DefinirObjectivos',


   'content'=&gt;&#036;this-&gt;renderPartial('_formPag4',array(


   'form'=&gt;&#036;form,


   'obj'=&gt;&#036;obj,


 


    


   ),


           true)

);

&#036;tabs['Acção de Formação']=array(


   'id'=&gt;'Formação',


   'content'=&gt;&#036;this-&gt;renderPartial('_formPag5',array(


       'form'=&gt;&#036;form,


       'forma'=&gt;&#036;forma,


       'pif'=&gt;&#036;pif,


    


   ),


           true)

);

&#036;tabs['Resultado']=array(


   'id'=&gt;'resultado',


   'content'=&gt;&#036;this-&gt;renderPartial('_formPag6',array(


       'form'=&gt;&#036;form,


    


   ),


           true)

);

 &#036;tabs['Comentários']=array(


   'id'=&gt;'Comentários',


   'content'=&gt;&#036;this-&gt;renderPartial('_formPag7',array(


       'form'=&gt;&#036;form,


       'momento'=&gt;&#036;momento,


    


   ),


           true)

);

 &#036;this-&gt;widget('zii.widgets.jui.CJuiTabs',array(


    'tabs'=&gt;&#036;tabs,


     'options'=&gt;array(


         'collapsible'=&gt;false,


     ),


 ));

?>

&lt;br&gt;


&lt;div style=&quot;margin-left: 930px&quot;&gt;


      &lt;?php

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

'name'=&gt;'submit',





'caption'=&gt;'Enviar',





'htmlOptions'=&gt;array(





    'style'=&gt;'background:#006600;color:#ffffff;',





),

));

    ?&gt;


&lt;/div&gt;














&lt;?php &#036;this-&gt;endWidget(); ?&gt;

</div>

In the tab Goals Last Year I update this data and in the tab New Goals I create the new Goals, but in the first tab I use tabular input for to save the data.

The problem is when i try save the model simultaneous.

I try this wiki http://www.yiiframework.com/wiki/472/use-a-form-and-cgridview-in-separate-cjuitabs-with-same-or-multiple-models-and-submit-all-cjuitabs-simultaneously/, but I can’t save the data.

Please a need help.

Sorry my bad English.

Thank You for your attention!