Big Problem When Using Clistview Inside Cjuitabs With Pagination

i have database include table: tbl_category, tbl_store_product, tbl_store_product_category

i using CJuiTabs with child tab is load from table tbl_category,

and content of every tabs is load from CActiveDataProvider with relation:

tbl_category 1<---->M tbl_store_product_category

tbl_store_product 1<---->M tbl_store_product_category

tbl_category M<---->M tbl_category

here is my Controller:

$model = Category::model()->findAllByAttributes(array('type'=>'store'));

$storeCategory = array();

foreach ($model as $key=>$value) {

	array_push($storeCategory, $key = array(


	'content' => $this->renderPartial('cat_view_content',



		'int' => $key),true,false





$this->render('index', array('storeCategory' => $storeCategory ,'storeProduct'=>$storeProduct));

In my View:







In renderPartial cat_view_content:

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






		'pager' => array(

				'header' => '',

				'maxButtonCount' => 5,





in itemView product_view_content:

<div style="background-color: gray;margin: 10px;">

<?php echo $data->product_name;?>


<br />

The first time load OK ::)

(sorry, i can’t post image into this thread)

http : // (home.png)

Then, i click page 2, problem is:

http : // (click_on_page_2.png)

The data load is wrong (it’s load include data of Android’s category and Windows Phone’s category product :blink: )

And second problem: when click Android (or Windows Phone Tab): the Tabs is lost:

http : // (the_tab_is_lost.png)

Can every one help me fix this problem (when using pagination on CJuiTabs)?

Thanks all very much !!!

Because CListView in tabs content have same id ‘cat-view’

Try fix bug id duplicate


Comment all your js code relative to tab and listview.

Then for me known you see second problem again?.

Thanks oxigen. now, pagination work fine.

but still get problem is: the Tab is lost.

When page is complete loaded, it’s look like:

http : // (home.png)

But after that, i click on Android (or Windows Phone) tabs, it’s look like:

http : // (tab_is_lost.png)

What wrong in this case ???

can you help me ?

I’d suggest using Firebug to make sure you’re closing your divs correctly and aren’t duplicating ids anywhere. I had a problem where I had tons of nested renderPartials in my tabs causing similar problems and it was a while before I found which was causing the problem.