I looked through a lot of ExtJS 4 MVC examples, and all of them pretty much show the same thing: the application creates a viewport, loads in a view and has โcontrollersโ that initialize the controller:
Ext.application({ name: 'AM', controllers: [ 'Users' ], launch: function() { Ext.create('Ext.container.Viewport', { layout: 'fit', items: [ { xtype: 'userlist' } ] }); } });
This is great, but now let me say that in my application I want my view to have a button that opens an entire new controller / view, how do you do it?
I think that what I'm looking for is a way to say something like: - Create a controller (run its initialization code) - in the controller's initialization code, create a view and show it
Is it right, and how do you do it?
I want to clarify that in my case I will need TWO separate instances of the SAME controller / view combination. For example, I might have a tabbed view and two tabs. Then I want to put in each tab two separate instances of the controller "User" and "user.List".
Scott szretter
source share