| 1 |
- MWF.xDesktop.requireApp("process.Xform","$Module",null,false);COMMON.AjaxModule.load("JSONTemplate",null,false);MWF.xApplication.process.Xform.SourceText=MWF.APPSourceText=new Class({Extends:MWF.APP$Module,_loadUserInterface:function(){this._loadJsonData()},_getSource:function(){var t=this.node.getParent();while(t&&(t.get("MWFtype")!="source"&&t.get("MWFtype")!="subSource"&&t.get("MWFtype")!="subSourceItem"))t=t.getParent();return t?t.retrieve("module"):null},_loadJsonData:function(){this.node.set("text","");this.source=this._getSource();if(this.source){if(this.source.data){this.template=new Template;this.text=this.template.substitute("{"+this.json.jsonPath+"}",this.source.data);if(this.json.jsonText){if(this.json.jsonText.code){this.text=this.form.Macro.exec(this.json.jsonText.code,this);this.node.set("text",this.text)}else{this.node.set("text",this.text)}}else{this.node.set("text",this.text)}}}}});
|