|
父页面代码
var arr = [];
var mainData = this.comp("mainData");
var docNodeList = this.comp("docNodeList"); //data
docNodeList.each(function(options){
arr.push(options.row.toJson());
});
this.comp("windowRunner1").open({
"src":"$UI/test1/test1/process/test1/mainActivity.w",
"process":"/test1/test1/process/test1/test1Process",
"activity":"mainActivity",
"params":{
"operator":"news",
"fMC": mainData.getValue("fMC"),
"row2": arr
}
});
子页面接收代码:
Model.prototype.modelParamsReceive = function(event){
this.getParentModel().close();
var mainData = this.comp("mainData");
console.log(event.params.row2);
var docNodeList = this.comp("docNodeList");
mainData.newData();
mainData.setValue("fMC", event.params.fMC);
console.log(mainData.getCurrentRowID());
console.log(event.params.row2[0].sDocName.value);
for(var i=0;i < event.params.row2.length; i++){
event.params.row2[i].userdata.id.value = justep.UUID.createUUID(); //这个是传过来的DATA中SA_DocNode表的sID
event.params.row2[i].sParentID.value = mainData.getCurrentRowID();
docNodeList.loadData(event.params.row2[i]); //这儿给data赋值不过去
}
mainData.saveData();
docNodeList.saveData();
docNodeList.refreshData();
this.comp("list1").refresh(true);
};
注:父页面与子页面的docNodeList都是系统表SA_DocNode |
|