- 注册时间
- 2012-11-12
- 最后登录
- 2018-4-2
- 阅读权限
- 10
- 积分
- 25
- 精华
- 0
- 帖子
- 4
|
JSP
<body>
<div id="datagrid1" class="mini-datagrid" url="/jp/jp_search1.do"
style="width: 1000px; height: 500px;" idField="id" allowResize="true">
<div property="columns">
<div type="indexcolumn"></div>
<div field="cpmc" width="120" headerAlign="center" allowSort="true">
产品名称
</div>
</div>
</div>
<script type="text/javascript">
mini.parse();
var grid = mini.get("datagrid1");
grid.load();
</script>
</body>
action
public String search1() {
int pageIndex=Integer.parseInt(getServletRequest().getParameter("pageIndex"));
int pageSize=Integer.parseInt(getServletRequest().getParameter("pageSize"));
HashMap map = new HashMap();
map.put("total", this.jpSrv.getRows(jp, getuser(),"all"));
map.put("data", this.getJpSrv().getListJp(pageIndex, pageSize, jp, getuser(), "all"));
String json=JSON.Encode(map);
try {
getServletResponse().getWriter().write(json);
System.out.println(json);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return "same";
}
报错信息
JSON格式
求解
|
|