I'm trying to implement server side pagination like datetable and I found backbone.paginator library, I don't know if there is something else.
Through their examples they used another library to help accomplishing this which is backgrid.js and its paginator plugin
Is it possible to do this pagination without Backgrid? Could you please add any example on this?
I did it
in the
View initialize
functionI call
here its implementation
in the server side (java spring) I modified the api to accept new query strings
and instead of returning the list directly it returns useful pagination info like
check this server-side snippet (I know it's not related but worthy to look at)
now back the function call it will till the server to get page 1 with a page size of 10
in my template, I have this
let me tell you how I populate it
and here is the most important part
each li I create it has
data-pb-page-number
to be used laterone more thing, how to make new requests to other pages
in the
View initialize
functionhere its implementation
the the result is like this
this how I solved my problem but the question still not answered
I developed the following code to share with you A JS/php code that do server site pagination and you could change it according to your need and later i may summarize it better.
First make connection to DB and create pagination table:
Second insert 400 same records :
Then make test.php
Then make js.js :
Make testa.php :
I wish that help you .