problems with CJuiTabs

Hi all,

i’ve this problem: i’ve created a CJuiTabs in an action view, composed of three partial rendered views (as shown in the code below)

<div>

<?php

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

'tabs' =&gt; array(


    'Generale'=&gt;&#036;this-&gt;renderPartial('_classifica_punti',array('classificaPointsDp' =&gt; &#036;classificaPointsDp),true),


    'Per Estensione'=&gt;&#036;this-&gt;renderPartial('_classifica_planets',array('classificaPointsDp' =&gt; &#036;classificaPlanetsDp),true),


    'Per Ricerca'=&gt;&#036;this-&gt;renderPartial('_classifica_tech',array('classificaPointsDp' =&gt; &#036;classificaTechDp,'model'=&gt;&#036;model),true),


    )));

?>

</div>

I tried to implement in the third, an advanced search form in this way (we’re looking the _classifica_tech view)

<?php

Yii::app()->clientScript->registerScript(‘search’, "

$(’.search-button’).click(function(){

&#036;('.search-form').toggle();


return false;

});

$(’.search-form form’).submit(function(){

&#036;.fn.yiiListView.update('classifica_tech', {


	data: &#036;(this).serialize()


});


return false;

});

");

echo CHtml::link(ucwords(‘advanced’),’#’,array(‘class’=>‘search-button’)); ?>

<div class="search-form" style="display:none">

<?php $this->renderPartial(’_search’,array(

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


    'route'=&gt;'/site/classifica/showMy/position'

)); ?>

</div>

<div id="CtechId">

<?php

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


    'id'=&gt;'classifica_tech',


    'dataProvider'=&gt;&#036;classificaPointsDp,


    'itemView'=&gt;'_classifica_view',


    'ajaxUpdate'=&gt;'CtechId'


)); ?&gt;

</div>

and finally this is the code for the _search form…

<div class="wide form">

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

'action'=&gt;Yii::app()-&gt;createUrl(&#036;route),


'method'=&gt;'post',

)); ?>

&lt;table&gt;


    &lt;tr&gt;


        &lt;td&gt;


            &lt;?php echo &#036;form-&gt;label(&#036;model,'username',array('style'=&gt;'font-size: 10px;font-weight: bold;')); ?&gt;


        &lt;/td&gt;


        &lt;td&gt;


            &lt;?php echo &#036;form-&gt;textField(&#036;model,'username',array('size'=&gt;20,'maxlength'=&gt;20,'style'=&gt;'font-size: 10px;')); ?&gt;


        &lt;/td&gt;


        &lt;td&gt;


            &lt;?php echo &#036;form-&gt;label(&#036;model,'empire',array('style'=&gt;'font-size: 10px;font-weight: bold;')); ?&gt;


        &lt;/td&gt;


        &lt;td&gt;


            &lt;?php echo &#036;form-&gt;textField(&#036;model,'empire',array('size'=&gt;20,'maxlength'=&gt;20,'style'=&gt;'font-size: 10px;')); ?&gt;


        &lt;/td&gt;


        &lt;td&gt;


            &lt;?php echo CHtml::submitButton('Search'); ?&gt;


    &lt;/td&gt;


    &lt;/tr&gt;


&lt;/table&gt;

<?php $this->endWidget(); ?>

</div>

ok i know that probably there is a very simpler way to do it…and surely this way will work, but i really can’t figure it out.

The only thing I know is that this solution doesn’t work: the form is shown as aspected but once the form is submitted it points to the site/classifica/showMy action which code is here…

class ClassificaAction extends CAction{

public  function run(){


    &#036;model = new User();


    &#036;classificaPointsDp = null;


    &#036;classificaPlanetsDp= null;


    &#036;classificaTechDp = null;


    





    if (&#33;empty (&#036;_GET['showMy'])){


        &#036;classificaPointsDp = &#036;model-&gt;GetClassificaPoints();


        &#036;classificaPlanetsDp = &#036;model-&gt;GetClassificaPlanets();


        &#036;classificaTechDp  = &#036;model-&gt;GetClassificaTech();





        if(isset(&#036;_POST['User']))


		&#036;model-&gt;attributes=&#036;_POST['User'];





        &#036;this-&gt;controller-&gt;render(


                'classifica',


                array(


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


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


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


                    'model'=&gt;&#036;model


                    )


                );


        


    }else


        &#036;this-&gt;redirect(Yii::app()-&gt;user-&gt;returnUrl);


    


    


}

and I can’t understand why the listview in the third tab doesn’t update the items according to the search conditions.

I don’t know (in addition) how can I set the focus of the tab! argh! Please help if you can :(

I sovled for the tab focus…what a shame i didn’t read the CJuiTabs documentation well; anyway the other problem remains…uhmm