Ext.application({ launch: function(){ this.viewport = Ext.ComponentQuery.query('viewport')[0]; this.centerRegion = this.viewport.down('[region=center]'); } });then, inside say, a controller, you can call this:
this.application.viewport
to get a reference to the viewport.
This was helpful. Thank you. :)
ReplyDeleteI spent way too much time trying to make sense of how to get access to MVC objects outside of the objects themselves. Your example helped me get there. Thanks!
ReplyDeletehow can i change viewport which is im application launch function dynamically with new viewport which is in my controller? Thanks
ReplyDeleteanother way to get references to viewport is, since Ext.application inherits from Ext.controller, use refs to get references.
ReplyDeleteHad a need for this today and wanted to say - Thanks!
ReplyDeletethis is helpful
ReplyDeletethanks