I have a fairly complex jqGrid implementation backed by Play! and I
personally use the @{} notation for specifying controller URLs.
Here is a snippet:
$("#datagrid").jqGrid({
url: '@{Drops.myActiveProjectsJSON}',
datatype: "json",
height: 260,
rowNum: 10,
rowList: [10,20,30],
colNames:['Name', 'Date', 'User'],
colModel:[ {name:'name', index:'name'},
{name:'timestamp', index:'timestamp', sorttype:"date",
formatter:"date", formatoptions:{newformat: 'd M Y H:i'}},
{name:'user', index:'user'} ],
pager: "#pdatagrid",
toolbar: [true, "top"],
viewrecords: true,
shrinkToFit: true,
autowidth: true,
sortname: 'timestamp',
sortorder: 'desc',
onSelectRow: function(id){
$("#btndetails").button("enable");
$("#btndelete").button("enable");
}
});
Hope that helps! :) Although to be perfectly honest I suspect your
problem might be in the fact that your JSON isn't correctly formatted
for jqGrid. It took me a bit of time to get it exactly right. You'll
be best off creating wrapper classes for JSON data.
> > > >
play-framewor...@googlegroups.com<play-framework%2Bunsubscribe@go
oglegroups.com>
> > <
play-framework%2Bunsu...@googlegroups.com<play-framework%252Bunsubscri
b...@googlegroups.com>
> >
play-framewor...@googlegroups.com<play-framework%2Bunsubscribe@go
oglegroups.com>