esayUI 不显示从后台返回的json格式数据,请问怎么解决

深夜读愁 2016-12-08 10:00:08
<thead>
<tr>
<th data-options="field:'username',width:80">姓名</th>
<th data-options="field:'cardnum',width:100">身份证号</th>
<th data-options="field:'gender',width:80,align:'right'">性别</th>
<th data-options="field:'tellnum',width:80,align:'right'">联系电话</th>
<th data-options="field:'position.pos',width:80,align:'right'">职位</th>
<th data-options="field:'totalscore',width:60,align:'center'">总分数</th>
</tr>
</thead>
</table>

这是我的jsp页面的一部分,请大神帮忙
...全文
199 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
毕设大神 2016-12-10
  • 打赏
  • 举报
回复


把这个map转成json返回到easyui datagrid
毕设大神 2016-12-10
  • 打赏
  • 举报
回复
easyui对json的格式有要求。还有属性名要对应上,包括大小写,检查一下。 如果你要填充的是datagrid网格数据,你json返回值包含数据的那一行key一定要是rows, 返回条数的那里key一定要是total
roger-jie 2016-12-08
  • 打赏
  • 举报
回复
你为何不把json也成一个json文件,url去调用那个文件呢
深夜读愁 2016-12-08
  • 打赏
  • 举报
回复
二楼是代码,请大神帮忙啊
深夜读愁 2016-12-08
  • 打赏
  • 举报
回复
<table class="easyui-datagrid" title="Basic DataGrid" style="width:700px;height:250px" data-options="singleSelect:true,collapsible:true, url:'[{"birthday":"2016-12-04","cardnum":"11111100000","createtime":null,"flag":0,"gender":"男","mid":0,"password":"123","position":{"pid":1,"pos":"部门经理"},"tellnum":"13599998888","totalscore":100,"updatetime":"2016-10-03","userid":1,"username":"www"}, {"birthday":"2016-12-04","cardnum":"123","createtime":null,"flag":0,"gender":"女","mid":1,"password":"123","position":{"pid":2,"pos":"中心经理"},"tellnum":"18812345678","totalscore":76.375,"updatetime":"2016-10-04","userid":2,"username":"qqq"}, {"birthday":"2009-06-02","cardnum":"123123","createtime":null,"flag":1,"gender":"男","mid":2,"password":"123","position":{"pid":3,"pos":"负责人"},"tellnum":"13366668888","totalscore":66.25,"updatetime":"2016-11-11","userid":3,"username":"eee"}, {"birthday":"2016-05-01","cardnum":"123456","createtime":null,"flag":0,"gender":"女","mid":3,"password":"123","position":{"pid":4,"pos":"普通员工"},"tellnum":"18712121212","totalscore":63.88,"updatetime":"2016-10-10","userid":4,"username":"aaa"}]', method:'get'"> <thead> <tr> <th data-options="field:'username',width:80">姓名</th> <th data-options="field:'cardnum',width:100">身份证号</th> <th data-options="field:'gender',width:80,align:'right'">性别</th> <th data-options="field:'tellnum',width:80,align:'right'">联系电话</th> <th data-options="field:'position.pos',width:80,align:'right'">职位</th> <th data-options="field:'totalscore',width:60,align:'center'">总分数</th> </tr> </thead> </table>
深夜读愁 2016-12-08
  • 打赏
  • 举报
回复
引用 3 楼 qq_28986643 的回复:
你为何不把json也成一个json文件,url去调用那个文件呢
好的,我试一下,谢谢

67,512

社区成员

发帖
与我相关
我的任务
社区描述
J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
社区管理员
  • Java EE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧