|
发表于 2016-12-8 16:31:37
|
显示全部楼层
- Model.prototype.button2Click = function(event) {
- var tp = new biz.Request.TranslateParam();
- tp.dataType = biz.Request.TranslateParam.DATATYPE_ROW_TREE;
- tp.setTreeOption('tree-parent-relation', "fParentID");
- var data = this.comp("data1");
- biz.Request.sendBizRequest({
- "context" : this.getContext(),
- "action" : "loadDataToTreeAction",
- "async" : true,
- "translateParam" : tp,
- "callback" : function(callbackData) {
- callbackData.ignoreError = false;
- if (callbackData.state) {
- data.loadData(callbackData.response);
- }
- }
- });
- };
- //data的onCreate事件
- Model.prototype.data1Create = function(event) {
- var data = this.comp("data1");
- data.defTreeOption.isTree = true;
- data.defTreeOption.option = {
- parentRelation : 'fParentID'
- };
- };
复制代码 |
|