需要帮助 从下面的代码我想将一些参数传递给genericInnerCopy的调用函数 但我无法传递参数,默认模型作为参数传递
var that = child;
that._type = 'PortfolioItem/' + that.get('PortfolioItemTypeName');
Rally.data.ModelFactory.getModel({
type: that._type,
success: this.genericInnerCopy,
scope: this
});
在下面的方法中,我想使用上面方法中的子对象
genericInnerCopy: function(model) {
this.model = model;
var record = Ext.create(this.model, {
Name: child.get('Name'),
});
record.save;
},
对此提出任何建议。提前谢谢。
答案 0 :(得分:0)
假设this
指向该应用,
var that = this;
您可以创建一个可在应用中的任何位置使用的对象:
that._child = child;
并且您不必将参考作为参数传递给它。