2007-12-09
Extjs中的combobox的动态加载问题
关键字: Ext.form.ComboBox
var RecordDef = Ext.data.Record.create([
{name: 'sn'},{name: 'groupName'}
]);
var groupStore=new Ext.data.Store({
//设定读取的地址
proxy: new Ext.data.HttpProxy({url: 'getGroupStore.action'}),
//设定读取的格式
reader: new Ext.data.JsonReader({
id:"sn",totalProperty:'totalCount',root:'groupList'
}, RecordDef),
remoteSort: true
});
var groupCombo=new Ext.form.ComboBox({
selectOnFocus:true,
valueField:'sn',
hiddenName:'groupCombo',
displayField:'groupName',
fieldLabel: '会员权限组',
blankText:'请选择权限组',
emptyText:'请选择权限组',
editable:false,
anchor:'90%',
forceSelection:true,
triggerAction:'all',
allowBlank:false,
store:groupStore,
typeAhead: true
});
{name: 'sn'},{name: 'groupName'}
]);
var groupStore=new Ext.data.Store({
//设定读取的地址
proxy: new Ext.data.HttpProxy({url: 'getGroupStore.action'}),
//设定读取的格式
reader: new Ext.data.JsonReader({
id:"sn",totalProperty:'totalCount',root:'groupList'
}, RecordDef),
remoteSort: true
});
var groupCombo=new Ext.form.ComboBox({
selectOnFocus:true,
valueField:'sn',
hiddenName:'groupCombo',
displayField:'groupName',
fieldLabel: '会员权限组',
blankText:'请选择权限组',
emptyText:'请选择权限组',
editable:false,
anchor:'90%',
forceSelection:true,
triggerAction:'all',
allowBlank:false,
store:groupStore,
typeAhead: true
});







评论排行榜