0
我想創建組合框列出所有按名稱過濾的組合項/特徵。這裏是我的代碼拉力組合框在單擊時不起作用
Ext.define('Rally.Dashboard', {
extend: 'Rally.app.App',
launch: function() {
if (this.down('#features')) {
this.down('#features').destroy();
}
var features = Ext.create('Rally.ui.combobox.ComboBox', {
itemId: 'features',
allowNoEntry: false,
storeConfig: {
model: 'PortfolioItem/Feature',
fetch: ['FormattedID', 'Name', 'ObjectID', 'UserStories'],
autoSelect: true,
pageSize: 100,
autoLoad: true,
filters: [this._getFilter()]
},
fieldLabel: 'Select Feature',
listeners: {
ready: function (combobox) {
if (combobox.getRecord()) {
this._onFeatureSelected(combobox.getRecord());
}
},
select: function (combobox) {
if (combobox.getRecord()) {
this._onFeatureSelected(combobox.getRecord());
}
},
scope: this
}
});
this.add(features);
},
_onFeatureSelected: function (feature) {
console.log('feature', feature.get('Name'));
},//_onFeatureSelected
_getFilter: function()
{
return {
property: 'Name',
operator: 'Contains',
value: 'Feature'
}
}
});
Rally.launchApp('Rally.Dashboard', {
name: 'example'
});
當儀表板第一次加載時,一切正常。但是當我單擊組合框時,組合框將被清除,並在日誌中顯示響應錯誤
「QueryResult」:{「Errors」:[「Could not parse:Could not find attribute \」_ refObjectName \ 「在查詢段\」_ refObjectName \「」「,」TotalResultCount「:0,」StartIndex「:0,」PageSize「:0,」Results「:[]}}中鍵入PortfolioItems)