使用 SDK 2,我创建了一个组合框,让我可以选择构建。我有一个监听器想要对 ChangeSets 数组做一些事情,但该数组只返回属性信息(ref 等)。在过去,我可以在父母身上获取我想要的字段,也可以在孩子身上看到它们。那么,我如何让 ChangeSets 提供修订版呢?
下面是组合框的定义:
this.down('#buildSelector').add({
xtype: 'rallycombobox',
displayField: 'Number',
listeners: {
scope: this,
select: function(combo, records, eOpts){
this._buildResults(combo.getRecord().data);//Build
},
ready: function(combo, records, eOpts){
this._buildResults(combo.getRecord().data);//Build
}
},
width: 280,
storeConfig: {
autoLoad: true,
model: 'Build',
pagesize: 20, //# of builds displayed in drop down
sorters: [{
property: 'CreationDate',
direction: 'DESC'
}],
listeners: {
load: function(store, records, successful){
console.log("dropdown records", records);
}
}
}
});
那个控制台日志给了我这样的东西
dropdown records
Array[200]
[0 … 13]
0: Ext.Class.newClass
data: Object
BuildDefinition: Object
Changesets: Array[2]
0: Object
_rallyAPIMajor: "1"
_rallyAPIMinor: "31"
_ref: "https://audemo.rallydev.com/slm/webservice/1.31/changeset/1260800.js"
_refObjectName: "BuildHealthReportRepo:1000"
_type: "Changeset"
__proto__: Object
1: Object
ETC...