Would that simply make using ajax pointless if you re-run the same
pagination just to fetch 1 record? 

You have 20 datasets / records on the page, delete 1,  why pull 20 records
(19 of them are already on the page)  just to replace the 1 you deleted?

 

 

 

From: cake-php@googlegroups.com [mailto:cake-php@googlegroups.com] On Behalf
Of Vinicius Dusso
Sent: Wednesday, April 17, 2013 2:34 PM
To: cake-php@googlegroups.com
Subject: Re: Silent Request Pagination Info

 

Hi Dave,

 

Use Ajax Pagination, and after delete a record,  reload the page which you
are again.

On Tuesday, April 16, 2013 6:31:35 AM UTC-3, advantage+ wrote:

What I am trying to do is create a standard pagination set, but the user has
the ability to delete a record using AJAX.

 

So if on page/2 for example standard pagination gets this data:

 

array(

        'page' => (int) 2,

        'current' => (int) 20,

        'count' => (int) 221,

        'prevPage' => true,

        'nextPage' => true,

        'pageCount' => (int) 12,

        'order' => null,

        'limit' => (int) 20,

        'options' => array(

               'page' => (int) 2,

                'conditions' => array()

        ),

        'paramType' => 'named'

)

 

What I need to do is if user using ajax deletes say record 25, that row
slides / removed from DOM, 

I need to now grab the next record which in this case id 41 (Page 2 of 12,
showing 20 records out of 221 total, starting on record 21, ending on 40)
and add it to the current pagination set.

 

Basically calling the pagination function after the user deletes the record
but grab the next record inline and update the paging count / records, and
append the new record to the bottom so there are still the 'limit' => (int)
20, in play.

 

Any ideas how to accomplish this?

 

Thanks,

 

Dave

 

 

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
 
--- 
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to