ExtJS 4.1 和 DeftJS 0.6.8
文件说"References to view components can be established via the control annotation and view-relative component query selectors"
文档示例:
control: {
submitButton: 'panel > button[text="Submit"]'
}
因此,在我的情况下,我想访问这样嵌套的菜单按钮:
...
extend: 'Ext.tree.Panel',
lid: 'mytreepanel',
dockedItems: [{
xtype: 'toolbar',
lid: 'mybbar',
items: [{
xtype: 'splitbutton',
lid: 'mysplitbutton',
menu: {
lid: 'mymenu',
items: [{
lid: 'createFolder',
text: 'Create folder',
}]
}
}]
}]
我的尝试:
control: {
createFolder: {
selector : '[lid=createFolder]',
// selector : 'menu[lid=createFolder]',
// selector : 'mytreepanel > menu[lid=createFolder]',
// selector : 'treepanel > toolbar > splitbutton > menu[lid=createFolder]',
listeners: {
click: 'createFolder'
}
}
}
没有任何效果。谁能指出我正确的方向?