|
楼主 |
发表于 2016-8-12 15:43:10
|
显示全部楼层
测试了一下,可以 ,但我的ACTION 需要三张表,每个表一个层级,怎么办呢,我用个DATA 控件
ACTION :调用一个存过
public static Table getMyTree(String PersonID){
java.sql.Connection conn;
try{
conn = com.justep.model.ModelUtils.getConnection("/ProjectManage/project/data");
java.sql.CallableStatement proc = conn.prepareCall("EXEC dbo.DES_GETTREE ? ");
proc.setString(1, PersonID);
proc.execute();
ResultSet rt = proc.executeQuery();
Table table = com.justep.system.util.BizUtils.resultSet2Table( rt,"/ProjectManage/project/data");
table.getProperties().put(Table.PROP_NAME_ROWID, "fID");
return table;
}
catch(Exception e){
e.printStackTrace();
return null;
}
}
UI JS ACTION:
Model.prototype.sendGetMyProjectAction = function(param) {
var tp = new biz.Request.TranslateParam();
tp.dataType = biz.Request.TranslateParam.DATATYPE_ROW_TREE;
tp.setTreeOption('tree-parent-relation', "FPARENTFID");
var self = this;
var str = "";
biz.Request.sendBizRequest({
"dataType" : "json",
"context" : self.getContext(),
"action" : "getMyProjectTree",
"async" : true,
"translateParam" : tp,
"parameters" : param,
"callback" : function(data) {
data.ignoreError = false;
if (data.state) {
//返回值
str = data.response;
}else{
alert("失败");
}
}
});
return str;
}
这样可以显示树,但延时逐级加载怎么做呢? |
|