this.addToolbarButton(
{
xtype : "combo",
id : 'cmp_applyYear',
fieldLabel : '申报年度',
name : 'applyYear',
anchor : '100%',
allowBlank : true,
msgTarget : 'under',
triggerAction : 'all',
displayField : 'name',
mode : 'local',
valueField : 'value',
emptyText :'请选择申报年度',
store : this.oldYearStore,
listeners : {
select : this.perSearch,
scope : this }
});
需求如下:这个comboBox的store ,比方说,今年是2010年,那么里面就是2009,2008,2007,2006,2005
不算今年的前五年。。根据系统当前日期读出。
{
xtype : "combo",
id : 'cmp_applyYear',
fieldLabel : '申报年度',
name : 'applyYear',
anchor : '100%',
allowBlank : true,
msgTarget : 'under',
triggerAction : 'all',
displayField : 'name',
mode : 'local',
valueField : 'value',
emptyText :'请选择申报年度',
store : this.oldYearStore,
listeners : {
select : this.perSearch,
scope : this }
});
需求如下:这个comboBox的store ,比方说,今年是2010年,那么里面就是2009,2008,2007,2006,2005
不算今年的前五年。。根据系统当前日期读出。
var isManager = [['0','否'],['1','是']]; //是否是管理员 0:不是 1:是
this.isManagerCom = new Ext.ux.Andrie.Select({
store : new Ext.data.SimpleStore({ // 填充的数据
fields : ['key', 'value'],
data : isManager
}),
fieldLabel : '是否是管理员',
hiddenName : 'ismanager',
name : 'ismanager',
value:'0',
displayField : 'value',
valueField : 'key',
typeAhead : true,
triggerAction : 'all',
width : 150,
emptyText : '请选择',
selectOnFocus : true,
mode : 'local',
editable : false,
itemCls :'left-TextField5'
}); 新建一个本地的
QQ群号:37198010
欢迎大家加入!
后台程序语言不限,本人主要以JAVA为主.呵呵
并且招募高手当群主,成为群领!!
var combo = Ext.getCmp('cmp_applyYear');
var years = [['0',2009],['1',2008]]...
combo.store.loadData(years);