tags:

views:

21

answers:

0

Hello.. I have a jsp page where in i am using jqgrid.. I want to get the json object from spring controller....

$("#task-list-table").empty().jqGrid({
    autowidth: true,
    datatype : "json",
    url: "login.html",
    colNames : ["Title","Order ID","Realty","Building",
                "Priority","Action","Assignee"],
    colModel : [
        { name : "Title",    index : "Title",    jsonmap: "title"    },
        { name : "OrderID",  index : "OrderID",  jsonmap: "orderId"  },
        { name : "Realty",   index : "Realty",   jsonmap: "realty"   },
        { name : "Building", index : "Building", jsonmap: "building" },
        { name : "Priority", index : "Priority", jsonmap: "priority" },
        { name : "Action",   index : "Action",   jsonmap: "action"   },
        { name : "Assignee", index : "Assignee", jsonmap: "assignee" }
    ],
    sortname : "Title",
    sortorder : "desc",
    shrinkToFit: true,
    viewrecords: true,
    jsonReader : {
        repeatitems : false
    },
    onSelectRow: function(){
        alert(jQuery("#task-list-table").getGridParam('selrow'));
    }
});

But the url is not getting called.... "login.html" whereas normal $.getJSON("login.html") works perfect.... ANy help is thanked :)