1.在Ext.onReady(function(){之外:
// ComboBox定义
// 用户状态 Ext.namespace('Ext.userstate'); Ext.userstate.states = [ ['0', '不可用'], ['1', '可用'] ]; 2.在Ext.onReady(function(){之内:
userstateExt = new Ext.form.ComboBox({
fieldLabel: '用户状态', hiddenName:'userstate', store: new Ext.data.SimpleStore({ fields: ['id', 'name'], data : Ext.userstate.states }), valueField:'id', value:'1',//注意默认值在此设置 displayField:'name', typeAhead: true, mode: 'local', triggerAction: 'all', emptyText:'请选择用户状态...', selectOnFocus:true, width:200 }) |
|