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)