我想在删除记录后更新我的C列表视图ID。 当我删除第一个记录时,它工作正常,但之后它没有工作,而且ID没有在c列表视图中更新。
Clistview是
$this->widget('zii.widgets.CListView',
array(
'id' => 'allposts',
'dataProvider' => $posts,
'itemView' => '_viewWallThoughts',
'template' => '{items} {pager}',
'ajaxUpdate'=>true,
...
)); ?>
和链接
echo CHtml::ajaxlink(
'Delete',
array('users/deleteWallComments'),
array(
"type" => "GET",
"data" => array('id'=>$wallComments['id'], "ajax" => true),
'beforeSend' => 'js:function(){if(confirm("Are you sure you want to delete?"))return true;else return false;}',
'complete'=>'js:function(jqXHR, textStatus){$.fn.yiiListView.update("allposts");}',
"success" => "function(){ }",
array('id'=>$wallComments['id'])
))