javascript - Extjs adding panel's button to parent window's bbar? - Stack Overflow

I have a button in a panel which gets rendered inside a window. And I want to be able to add that butto

I have a button in a panel which gets rendered inside a window. And I want to be able to add that button to a bottom bar in the window.
Current I am trying to add an onRender function to the panel to get the parent window using this.findParentByType('Ext.Window')
however it returns null.

I am even heading in the right direction?

EDIT: I am using extjs 3.2.2

I have a button in a panel which gets rendered inside a window. And I want to be able to add that button to a bottom bar in the window.
Current I am trying to add an onRender function to the panel to get the parent window using this.findParentByType('Ext.Window')
however it returns null.

I am even heading in the right direction?

EDIT: I am using extjs 3.2.2

Share Improve this question edited Aug 1, 2011 at 20:03 Reflux asked Aug 1, 2011 at 18:41 RefluxReflux 2,9594 gold badges27 silver badges27 bronze badges
Add a ment  | 

3 Answers 3

Reset to default 5

findParentByType takes xtype as parameter. So in your case you should use

this.findParentByType('window')

or

this.up('window')

Have you tried providing a unique id to your window and adding the buttons to it like so:

Ext.getCmp('myWindowId').add(buttonPanel);

@Nitin Singhal @Reflux

For ExtJS4: Ext.ComponentManager.get('html dom id')

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745345297a4623515.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信