如何在EXTJS页面中设置搜索框(或搜索字段).
我尝试了以下操作,但页面中没有显示任何内容:1.在WebContent/ext/ux文件夹中添加了SearchField.js.2.编码如下:
Ext.Loader.setConfig({
enabled: true,
paths: {
'Ext.ux': 'ext/ux'
}
});
Ext.require([
'Ext.ux.form.SearchField'
]);
Ext.onReady(function () {
var win=Ext.create('widget.window',{
title: 'Super User Access Management',
height: 480,
width: 640,
border:false,
items : [
{
xtype : 'combobox',
fieldLabel : 'Module',
value: 'Super Admin' ,
store: ['Super Admin', 'Partner Contact Management', 'Partner Trainning Management'],
listeners: {
select: function(){
alert('Hello module!');
}
}
},
{
xtype : 'combobox',
value: 'Infogain' ,
store: ['Infogain', 'IBM', 'Mocrosoft'],
listeners: {
select: function(){
alert('Hello partner!');
}
}
},
{
xtype: 'searchfield',
height: 30,
id: 'searchField',
styleHtmlContent: true,
width: 320,
fieldLabel: '',
},
{
xtype: 'gridpanel',
border: false,
title:'Empty grid',
columns: [{header: 'World'}],
store: Ext.create('Ext.data.ArrayStore', {})
}
]
});
win.show();
});
Run Code Online (Sandbox Code Playgroud)
请让我知道我做错了什么.