|
本帖最后由 594狂 于 2017-1-9 17:46 编辑
Model.prototype.button3Click = function(event){
var self = this;
biz.Request.sendBizRequest({
"context" : this.getContext(),
"action": "dcc007_action",
"contentType": "application/json",
"dataType": "application/json",
"parameters" : {
"id" : "10EFB180-7A57-4DC6-BCF3-2A6AAA05100F"
},
"callback": function(callbackdata) {
callbackdata.ignoreError = false;
if (callbackdata.state) {
justep.Util.hint("dcc007_action返回Table值调用成功");
var data = self.comp("data1");
data.loadData(callbackdata.response);
data.first();
alert(data.getCount());
alert(JSON.stringify(callbackdata.response));
}
}
});
};
public static Table dcc007_action(String id) throws Exception {
Connection conn = ModelUtils.getConnectionInTransaction("/dfs/dfs1/data");
Statement st = conn.createStatement();
String sql="Select S.shown_state, L.create_date from po_processlog AS L inner join po_shown_status AS S on L.station_code=S.station_code where L.poitem_id='10EFB180-7A57-4DC6-BCF3-2A6AAA05100F' order by L.create_date asc";
HashMap<String,String> sqlMap = new HashMap<String,String>();
sqlMap.put(SQL.DEFAULT_DB_NAME,sql);
ResultSet rs = st.executeQuery(sql);
Table table=SQL.select(sqlMap,null,"/dfs/dfs1/data");
table.getProperties().put(Table.PROP_NAME_ROWID, "create_date");
return table;
SQL查詢完後會返回數條shown_state,create_date數據然後我創建一個data,增加以上兩個欄位
data.loadData(callbackdata.response);後
data裡面是有數據的
但是datatables組件顯示不出數據!!!
甚麼原因?
|
-
alert顯示data是有數據的
-
但是datatables顯示不出數據
|