最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

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

programmeradmin1浏览0评论

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')

发布评论

评论列表(0)

  1. 暂无评论