0
jqGrid未顯示java服務返回的響應。jqGrid未顯示java服務響應
HTML:
<table id="fbDetailTable" style="display: none"></table>
Java腳本:
jQuery("#fbDetailTable").jqGrid({
url: "/ReportBatch/rs/ReportService/getFB?fB="+frtBill,
datatype: "json",
colNames: ['Store Number', 'Order Number', 'SKU number',
'Shipped Quantity','Order Created Date'],
colModel:[{name:'strNbr',index:'strNbr',width:100,jsonmap:'strNbr'},
{name:'orderNbr',index:'orderNbr',width:100,jsonmap:'orderNbr'},
{name:'skuNbr',index:'skuNbr',width:100,jsonmap:'skuNbr'},
{name:'shpdQty',index:'shpdQty',width:100,jsonmap:'shpdQty'},
{name:'ordCrtDt',index:'ordCrtDt',width:100,jsonmap:'ordCrtDt'}],
jsonReader: { repeatitems : false, strNbr: "0" },
viewrecords: true,
loadonce:true,
caption:"Order Details"
});
服務響應:
[{"strNbr":"6310",
"orderNbr":"10979577",
"skuNbr":"646274",
"shpdQty":"1",
"ordCrtDt":"2013-01-29"},
{"strNbr":"6310",
"orderNbr":"10979583",
"skuNbr":"765992",
"shpdQty":"3",
"ordCrtDt":"2013-01-29"
}]
響應頭:
Content-Type application/json
Date Mon, 04 Feb 2013 20:21:24 GMT
Server Apache-Coyote/1.1
Transfer-Encoding chunked
非常感謝。現在正在工作。 – AVVD
@AVVD:不客氣!如果問題解決了,您應該[「接受」](http://meta.stackexchange.com/a/5235/147495)答案。 – Oleg