using CListView inside CTabView

I trying to use clistview inside a ctabview widget but when I click on a sort link resorted result appended to the end of the list beside replace





<?php

    $this->widget('CTabView', array(

        'activeTab' => 'product-tab',

        'tabs' => array(

            'product' => array(

                'title' => Site::t('category', 'Products'),

                'content' => $this->renderPartial('partial/_product',array('dataProviderProduct' => $dataProviderProduct),true,false),

            ),

            'offer' => array(

                'title' => Site::t('category', 'Offers'),

                'content' => $this->renderPartial('partial/_offer',array('dataProviderOffer' => $dataProviderOffer),true,false),

            )

        ),

        'htmlOptions' => array('class' => 'product-collateral'),

        'cssFile' => false,

    ));

?>



and here is my _product view:




<div id="products-loading">

    <?php

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

        'id'=>'product',

        'dataProvider'=>$dataProviderProduct,

        'ajaxUpdate'=>true,

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

        'itemView'=>'partial/_viewProduct',

        'sortableAttributes' => array('update_date'=>Site::t('product','Date'),'name'=>Site::t('product','Name')),

        'summaryText' => 'Page {page}/{pages} Item {start}-{end} of {count} Total',

        'beforeAjaxUpdate' => 'js:function(product){

                                    $("#products-loading").addClass("products-loading");

                                }',

        'afterAjaxUpdate' => 'js:function(product){

                                    $("#products-loading").removeClass("products-loading");

                                }',

        'loadingCssClass' => 'loading',

        'htmlOptions'=>array('class'=>'tabs-content'),

        'cssFile'=>false,

    ));

    ?>

</div>



and the last part is just my list view file:




<div class="product-result">

    <div class="clearer"></div>

    <div class="result-container">

        <div class="image">

            <?php echo CTHtml::link(CTHtml::uploadedImageFile('product/' . $data['category_id'] . '/' . substr($data['image'], 0, -4) . '_thumb_130' . substr($data['image'], -4, 4), $data['name'], array('class' => 'frame')), array('/site/company/product', 'url' => $data['url'], 'id' => $data['id'], 'language' => Yii::app()->language), array('target' => '_blank'))?>

        </div>

        <div class="details">

            <p class="strong">

                <?php echo CTHtml::link($data['name'], array('/site/company/product', 'url' => $data['murl'], 'id' => $data['id'], 'language' => Yii::app()->language), array('target' => '_blank'))?>

            </p>


            <p class="description"><?php echo $data['description'];?>...</p>


            <p class="country">

                <?php //echo CTHtml::link($data->mname, $data->murl)?>

                <span class="gray"> [province: <?php //echo $data->region . ', ' . $data->country;?>] </span>

            </p>


            <div class="icons"></div>

        </div>

        <div class="contact">

            <a href="<?php echo Yii::app()->createAbsoluteUrl('/message/compose/compose', array('id' => $data['user_id'], 'language' => Yii::app()->language));?>" class="button btn-inq" title="<?php echo Site::t('search', 'Send Inquiry!');?>" type="button">

                <span><span><?php echo Site::t('search', 'Send Inquiry!');?></span></span>

            </a>

        </div>

    </div>

    <div class="clearer"></div>

</div>



I have this problem in ajax enabled so I think it should be solved somewhere in ‘content’ of CTabView but when I use ‘view’ the problem did not resolved.

any idea?

I dont understand what exactly you trying to do please you explain

I’m trying to show a CListView widget in a CTabView widget but it’s seems somethings go wrong through ajax enabled mode in CListView and it’s not work correctly actually it does not ubpdate propely and append beside replace for example in sort new page data is just append to the end of the old page data