|
本帖最后由 shuaigej 于 2016-12-2 11:21 编辑
datatable动态绑定数据源,报错:e.ref(...).get is not a function
datatable如下:
<div component="$UI/system/components/justep/dataTables/dataTables" flexibleWidth="true" responsive="true" rowActiveClass="active" class="table table-hover table-striped" xid="dataTables5" data="baasData1">
<columns xid="columns5">
<column name="xflsjdxz" xid="column1"></column>
<column name="zwdmmc00" xid="column2"></column></columns></div></div>
数据源绑定list没问题,绑datatable出了问题,后台提取数据:
public static JSONObject getcardinfo(JSONObject params, ActionContext context) throws SQLException, NamingException {
Connection conn = context.getConnection(DATASOURCE_jiudian);
//String userId = params.getString("userId");
try{
String sql = " SELECT xflszwdm,zwdmmc00,xflsjdxz,round(xflsje00,2) as xflsje00,ye00 FROM krzw";
Table table = DataUtils.queryData(conn, sql, null, null, null, null);
System.out.println("---------");
return Transform.tableToJson(table);
} finally {
conn.close();
}
}
baasData1绑定url:/gems/operation ,queryaction:getcardinfo,idcolumn:xflszwdm
|
|