Clistview ajax pagination

Hi, I’m using CListView like the following example:




<?php

$dataProvider=new CActiveDataProvider('Routes');

$dataProvider->pagination->pageSize=1;

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

    'dataProvider'=>$dataProvider,

    'itemView'=>'/routes/_viewKML',   // refers to the partial view 

    'sortableAttributes'=>array(

        'length',

        'valuation'=>'rating',

    ),

)); 



In the _viewKML I want to show a KML file that it’s in my server. The problem is when I go to the next page in the ClistView the _viewKML doesn`t reload and the map not appears… the same when I have all the items in one page and I try to use the sort function… (I show the kml with EGMaps extension)

Just taking a stab in the dark here, but try setting the CListView’s id property.




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

    'dataProvider'=>$dataProvider,

    'itemView'=>'/routes/_viewKML',   // refers to the partial view 

    'sortableAttributes'=>array(

        'length',

        'valuation'=>'rating',

    ),

    'id' => '#kmlList',

)); 



[size=2]IT WORKS!! thanks![/size]

Worked for me too :) Thanks :)