Button ExtJs-ref属性
我有一个代码如下Button ExtJs-ref属性,button,extjs,textfield,ref,Button,Extjs,Textfield,Ref,我有一个代码如下 window = Ext.extend(Ext.Window, { initComponent: function(){ Ext.applyIf(this,{ fbar: { xtype: 'toolbar', items: [{ xtype: 'button', id: 'button1', text: 'button1' ref: ??
window = Ext.extend(Ext.Window, {
initComponent: function(){
Ext.applyIf(this,{
fbar: {
xtype: 'toolbar',
items: [{
xtype: 'button',
id: 'button1',
text: 'button1'
ref: ??
}
]
},
items:[{
xtype: 'form',
items: [{
layout: 'form',
items:[{
xtype: 'field'
id: 'field1'
ref: ??
}]
}]
}]
})
}
})
我可以为上面的字段和按钮的ref属性提供什么,以便我可以与窗口变量一起使用?请帮我做这件事
我尝试使用“../../button”,但无法通过窗口变量进行访问。我自己想
按钮1的参考号为“./button”,字段的参考号为“../../fieldname”。。。该窗口被调用为
testWindow=新窗口()
按钮1可通过以下方式访问:,
testWindow.button
而这个领域
testWindow.fieldname