View Full Version : How to access parent window object

15 May 2013, 8:09 AM
Hi all,

I have a window (Window 1)with one button.
On the button click action i am opening another window(Window 2).
When i will close the window 2 then i want to change the window 1 button text.

how i will access window 1 object while closing window 2?

please help how i will achieve this?


15 May 2013, 7:10 PM
Are you using MVC? What does your code look like?

15 May 2013, 10:34 PM
In the Listener event of the window 2 close, add


If the window 1 is configured in a object, try


16 May 2013, 7:21 AM
Hi, Thanks for your reply.

i got the solution.

var window1Obj = Ext.ComponentQuery.query('firstwindow')[0]; //where firstwindow is userAlias name of Window 1

window1Obj.down('#btn').setText('New text');

Using window1Obj, we can access any control of window 1.