0
我使用ExtJS的MVC和我定義組合框錯誤定義組合框
Ext.define('Ext.view.Common.PersonageComboBox', {
extend: 'Ext.form.ComboBox',
alias: 'widget.PersonageComboBox',
minChars: 0,
store: 'PersonageStore',
style: 'float: right;',
valueField: 'Id',
displayField: 'Title',
typeAhead: true,
hideLabel: false,
hideTrigger: true,
width: 300,
queryMode: 'server',
listConfig: {
loadingText: 'درحال جستجو',
getInnerTpl: function() {
return '{Title} - {Type}<br />';
}
}
});
,並在控制器I defin在
extend: 'Ext.app.Controller',
requires: ['Profiler.resource.Icon', 'Profiler.resource.Size'],
stores: ['PhoneTypeStore',
'PhoneStore',
'EmailStore',
'SettingStore',
'AgentStore',
'PersonageStore'],
models: [
'PhoneInfo',
'PhoneTypeInfo',
'EmailInfo',
'SettingInfo'],
views: [
'Common.PersonageComboBox',
'Personage.PhoneGrid',
'Personage.PhoneAssignment',
'Personage.EmailGrid',
'Personage.Settings',
'Personage.AgentGrid'
],
refs: [{
ref: 'phone',
selector: 'PhoneList'
}, {
ref: 'PhoneAssignment',
selector: 'PhoneAssignment'
}, {
ref: 'EmailList',
selector: 'EmailList'
}],
,這是我的模型
Ext.define('Profiler.model.PersonageInfo', {
extend: 'Ext.data.Model',
fields: [{ name: 'Id', type: 'int' },
'Title', 'Type'],
});
,但我的頁面是白色並且沒有錯誤