从struts2动作类中的jqgrid获取null json网格数据。请指向正确的方向

时间:2013-07-31 20:03:29

标签: jqgrid struts2

$。AJAX({                                 键入:" POST",                                 url:" SendData.action",                                 数据类型:" JSON&#34 ;,                                 data:dataToSend,                                 contentType:" application / json;字符集= UTF-8&#34 ;,                                 success:function(response,textStatus,xhr){                                     警报("成功&#34);                                 },                                 错误:function(xhr,textStatus,errorThrown){                                     警报("错误&#34);                                 }

                        });

dataToSend getter和setter .. 我应该解析成java数组列表还是只需要打印dataToSend

1 个答案:

答案 0 :(得分:0)

在ajax中发送数据如下

 data :{"dataToSend":data} //where "data" is the data which u want to send

和“dataToSend”的数据类型取决于您发送的数据类型。