- 注册时间
- 2012-10-29
- 最后登录
- 2013-6-23
- 阅读权限
- 10
- 积分
- 135
- 精华
- 0
- 帖子
- 33
|
factory 发表于 2012-10-29 16:33
[
{"enddate":"","id":"0","name":"草案提议","stardate":""},
{"enddat ...
我改成了这种格式的json了
后台转换json的方法:
protected ModelAndView handleRenderRequestInternal(RenderRequest request,
RenderResponse response) throws Exception {
List state = managementService.getStatus();
JSONArray jsonArray = JSONArray.fromObject(state);
System.out.println(jsonArray);
response.getWriter().write(jsonArray.toString());
return null;
}
前台:
<div title="当前阶段">
<div id="listbox2" class="mini-listbox" style="width:650px;height:450px;"
allowCellEdit="true" allowCellSelect="true" multiSelect="true" onvaluechanged="onListBoxValueChanged"
showEmptyText="true" url='<cut value="${currentUrl}" escapeXml="false"/>'>
<div property="columns">
<div header="当前阶段" field="id"></div>
<div header="阶段" field="name"></div>
<div header="开始时间" field="enddate"></div>
<div header="结束时间" field="enddate"></div>
</div>
</div>
</div>
还是报json is error
[
{"enddate":"","id":"0","name":"草案提议","stardate":""},
{"enddate":"","id":"1","name":"草案审核","stardate":""},
{"enddate":"","id":"2","name":"草案附议","stardate":""},
{"enddate":"","id":"3","name":"\t提案审核","stardate":""},
{"enddate":"","id":"4","name":"上会提案","stardate":""},
{"enddate":"","id":"5","name":"办理回复","stardate":""},
{"enddate":"","id":"6","name":"\t结束","stardate":""}
] |
|