CListView AjaxLink Delete

Hi,

I have read the posts on AjaxLink and Updates here and here. I think my problem isn’t related to those.

I have a CListView that displays thumbnails and a corresponding AjaxLink to delete the thumbnail. The AjaxLink deletes the thumbnail and updates the div perfectly. However, the "sortableAttributes" links are now appended with the AjaxLink url.

Before AjaxLink Click - "index-local.php/admin/portfolio/imageadmin/id/4/PortfolioImage_sort/filename"

After AjaxLink Click - "index-local.php/admin/portfolioimage/delete/id/112/PortfolioImage_sort/filename"

Notice the "delete/id/112/" in the updated url.

I did some digging into CListView code and found


$url=$this->createUrl(Yii::app()->getController(),$directions);

in CSort.php. Since the AjaxLink is calling a different controller, is the current controller now set to it? I could set the controller back the previous one but that seems like a hack.

Have you run into this issue and how did you solve it?

Cheers.

I think that you need to specify the CListView.ajaxUrl property