Просмотр исходного кода

子数据源显示单个数据错误修复

huqi 5 лет назад
Родитель
Сommit
64e573ec6a
1 измененных файлов с 14 добавлено и 11 удалено
  1. 14 11
      o2web/source/x_component_process_Xform/SubSource.js

+ 14 - 11
o2web/source/x_component_process_Xform/SubSource.js

@@ -18,16 +18,7 @@ MWF.xApplication.process.Xform.SubSource = MWF.APPSubSource =  new Class({
     _loadUserInterface: function(){
         this.loopNodes = [];
         this.subSourceItems = [];
-        var node = new Element("div").inject(this.node, "before");
-        this.node.inject(node);
-        this.loopNode = this.node.dispose();
-        this.node = node;
-        var id = node.get("id");
-        node.set("id", "");
-        this.node.set({
-            "id": id,
-            "mwftype": node.get("mwftype")
-        });
+        this.node.hide();
         this.node.store("module", this);
         this._loadJsonData();
     },
@@ -106,11 +97,23 @@ MWF.xApplication.process.Xform.SubSource = MWF.APPSubSource =  new Class({
             if (this.source.data){
                 this._getSourceData(this.source.data);
                 this.fireEvent("postLoadData");
+                this.node.show();
                 if (typeOf(this.data)=="array"){
+                    var node = new Element("div").inject(this.node, "before");
+                    this.node.inject(node);
+                    this.loopNode = this.node.dispose();
+                    this.node = node;
+                    var id = node.get("id");
+                    node.set("id", "");
+                    this.node.set({
+                        "id": id,
+                        "mwftype": node.get("mwftype")
+                    });
+
                     this._loopData();
                     this.fireEvent("loadData");
                 }else{
-                    this._loadModules(this.node);
+                    this.form._loadModules(this.node);
                 }
 
                 //this.tmpDiv = new Element("div");