Firstly, I already read the question " jQuery Grid Recommendations ", but it does not answer my question.
I have a small REST API with the MongoDB website :
Get all the equipment:
GET /equipements HTTP/1.1 {{_id:key1, name:Test Document 1, plateforme:prod}, {_id:key2, name:Test Document 2, plateforme:prod}, ...}
Get keyfob: key1
GET /equipements/key1 HTTP/1.1 {"_id": "key1", "name": "Test Document 1", "plateforme": "prod"}
Add new equipment
PUT /equipements HTTP/1.1 {"_id": "key8", "name": "Test Document 3", "plateforme": "prod"} HTTP/1.0 200 OK
Now I need to find an easy way to allow the lambda user to add / view / supplement equipment. So, I think the web interface with jQuery as a user interface is the best. I tried with Sencha Rest Proxy , but I do not know javascript, and I can not adapt this example.
How to fix my javascript for my REST server?
AND / OR
Can you recommend a simpler alternative to the Sencha Rest proxy? (which works with my REST database)
Answer: jqGrid
AND / OR
In which jQuery Grid would you recommend me? (which works with my REST backend)
Answer: jqGrid
The final question . Why are my cells not being edited with a double click?
Applications
Server Side (EDIT: Add POST Method)
EDIT: JQGrid:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Rest Proxy Example</title> <link rel="stylesheet" type="text/css" href="/static/css/ui.jqgrid.css" /> <link rel="stylesheet" type="text/css" href="/static/css/jquery-ui-1.8.20.custom.css" /> <script type="text/javascript" src="/static/js/jquery.js"></script> <script type="text/javascript" src="/static/js/jquery.jqGrid.min.js"></script> <script type="text/javascript" src="/static/js/grid.locale-fr.js"></script> <script type="text/javascript"> jQuery(document).ready(function(){ var lastsel; jQuery("#list2").jqGrid({ url:'equipements', datatype: "json", colNames:['Id','Name', 'Plateforme'], colModel:[ {name:'_id',index:'_id', width:50, editable:true}, {name:'name',index:'_id', width:300, editable:true}, {name:'plateforme',index:'total', width:200,align:"right", editable:true}, ], rowNum:30, rowList:[10,20,30], pager:'pager2', sortname: '_id', viewrecords: true, width: 600, height: "100%", sortorder: "desc", onSelectRow: function(_id){ if(_id && _id!==lastsel){ jQuery('#liste2').jqGrid('restoreRow',lastsel); jQuery('#liste2').jqGrid('editRow',_id,true); lastsel=_id; } }, jsonReader: { repeatitems: false, id: "_id", root: function (obj) { return obj; }, records: function (obj) { return obj.length; }, page: function (obj) { return 1; }, total: function (obj) { return 1; } }, editurl:'equipements', caption:"Equipements" }); jQuery("#list2").jqGrid('navGrid','#pager2',{edit:true,add:true,del:true}); }); </script> </head> <body> <table id="list2"></table> <div id="pager2"></div> <br /> </body> </html>