Yii Framework Forum: CListView/Pagination/Ajax problem - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

CListView/Pagination/Ajax problem Rate Topic: -----

#1 User is offline   TAQTICA 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 23
  • Joined: 13-February 10

Posted 01 June 2010 - 02:07 PM

Hi all,

I have the following view:

<div class="view">
<?php
    Yii::app()->session['from']=$from;
    $this->widget('CListView', array(
        'dataProvider'=>$dataProvider,
        'itemView'=>'_viewGuest',
    ));
?>
</div>


The _viewGuest is the following:
  <?php echo CHtml::encode($data->name); ?>
  <?php echo CHtml::encode($data->statusText); ?>
  <?php echo CHtml::encode($data->email); ?>
  <?php echo CHtml::ajaxLink('Resend',CController::createUrl('resend',array('id'=>$data->id))
     array('type'=>'POST','success'=>'function(msg) { window.alert(msg); }')
  ); ?>


The problem I have is that when the "Resend" action is called from an item in the first page, it works OK. But on following pages it allways sends ids from the first page.

Any help will be highly appreciated.
0

#2 User is offline   zaccaria 

  • Elite Member
  • PipPipPipPipPip
  • Yii
  • Group: Members
  • Posts: 2,232
  • Joined: 04-October 09
  • Location:Moscow

Posted 02 June 2010 - 09:14 AM

Don't use ajaxLink, it has problem when is ajax-refreshed. Look this post
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users