10分 |
JSON的格式不对~ 去看一下datagrid的标准demo~大概是这样的:
{“total”:xx,”rows”:[…]} total是总数,rows是json数组~在你的Action把格式拼标准了~ 数据才能显示出来~ 切记。 |
10分 |
firebug下你这个url返回来的json有没有呗
|
你返回格式不对 如这样的
得 有 “total”:”2″,”rows” |
|
加上也不行哪。
{“total”:3,”employeeList”:[{“department”:null,”employeeID”:2,”employeeName”:””,”employeePassWord”:””,”employeePhotoPath”:””,”employeeStatus”:””,”position”:null,”voucherList”:[]},{“department”:null,”employeeID”:3,”employeeName”:”张阳”,”employeePassWord”:”123″,”employeePhotoPath”:”E:\TomCat\apache-tomcat-6.0.39\webapps\SSH\upload\IMG_20140503_111557.jpg”,”employeeStatus”:””,”position”:null,”voucherList”:[]},{“department”:null,”employeeID”:4,”employeeName”:”liliy”,”employeePassWord”:”123″,”employeePhotoPath”:”E:\TomCat\apache-tomcat-6.0.39\webapps\SSH\upload\IMG_20140503_100631.jpg”,”employeeStatus”:””,”position”:null,”voucherList”:[]}],”rows”:5} |
|
能在我贴出来的这段里面改下吗 |
|
String json = “{“total”:” + total + “,”rows”:”+ JSONArray.fromObject(list).toString() + “}”; |
|
10分 |
格式是这样的点我 。
total”: 还有rows |
你 的map.put (“total”,xxx)
map.put (“rows”,xxx) |
|
{“total”:3,”rows”:[{“department”:null,”employeeID”:2,”employeeName”:””,”employeePassWord”:””,”employeePhotoPath”:””,”employeeStatus”:””,”position”:null,”voucherList”:[]},{“department”:null,”employeeID”:3,”employeeName”:”张阳”,”employeePassWord”:”123″,”employeePhotoPath”:”E:\TomCat\apache-tomcat-6.0.39\webapps\SSH\upload\IMG_20140503_111557.jpg”,”employeeStatus”:””,”position”:null,”voucherList”:[]},{“department”:null,”employeeID”:4,”employeeName”:”李凯”,”employeePassWord”:”123″,”employeePhotoPath”:”E:\TomCat\apache-tomcat-6.0.39\webapps\SSH\upload\IMG_20140503_100631.jpg”,”employeeStatus”:””,”position”:null,”voucherList”:[]}]} |
|
顶一下,没人了吗
|
|
10分 |
很明显不对 你的JSON8个属性,你前台就显示6个~要一致 |