PDA

View Full Version : How to get to the view from a new window



pinidbest
2 Oct 2012, 4:37 AM
Hi ,
I have a view that opens a new Ext.window.window
this window is being opened from the this.tools item.
How do I get a ref to the main view from this window code?

skirtle
2 Oct 2012, 4:46 AM
The window won't have any link back to the original view unless you provide one.


// Tool handler
handler: function(tool) {
var mainView = tool.up('...'); // replace with a suitable query

Ext.create('Ext.window.Window', {
originalView: view,
...
});
}

From inside the window you can then access the view using:


this.originalView

pinidbest
2 Oct 2012, 4:47 AM
Thanks