So I'm working on a project and naturally I want to display information in a grid format and after an entire day of trying different products I came upon http://datatables.net/api which is really easy to implement, and makes much more sense to me than anything else I found. Problem is that I don't see an easy way to make it work well with my RESTful calls to the server. There is a great chance that I'm just overlooking something in the documentation, but I don't see exactly what I'm looking for. The information I need will almost exclusively be in the search parameters. The information will be in the format:
GET COLLECTION ?where=
GET COLLECTION ?include=
GET COLLECTION ?orderby=
GET COLLECTION ?sortby=
GET COLLECTION ?pageIndex=
GET COLLECTION ?limit=
GET COLLECTION ?fields=
GET COLLECTION ?q=
I already found the post Editable jQuery Grid Recommendations with REST API which explains how to do something similar with jqGrid, but I'd rather try and make Datatables work if I can since it makes more sense to me. Any help would be greatly appreciated.
Edit
What I'm really looking for, which so far I don't think has been answered is how to figure out what URL the client is typing to make the request with. For example if I had the query:
www.somewebsite.com/v1/people?limit=10&pageIndex=20&orderby=personID
Than what I'd expect is obviously for the orderby to be personID and the limit to be 10 and pageIndex to be 20.
The point of the question is that going both to and from the server, I need the url to be in that type of format any time the data table changes, because what we want is to only serve up the data for each page when the user asks for it. So if I got that request from the server I'd know the data table would be on the 3rd page, with 10 entries ordered by the personID column. How would you go about giving that information to the dataTables table and if they changed something, how would you get it back out again (I assume if you are able to answer the former than it'll answer the latter)?