Multiple controllers or one?
I have a web application does besides the static declared views and controllers should also load widgets from a “bucket of widget” the user can add to the page.
So this means I am creating the views dynamically and want to load their controllers again (The controller have not been declared in the application controllers mixed collection)
If I am having many instances of the same view,
Should they use the same controller of have a controller instance for each of the views?
What is the best practice for this?
At the moment I am loading the views dynamically and I am loading only a single view using the getController function Ext API is offering (But this methods check to see if a controller with the same name already been loaded and this causes for a single controller to exists.
The problem with that is that the controller now control each event from the view many times (for each instance) .
Do I need to change the code for the controller so he will know to whom to listen or to load a controller for each view instance as well???
Found the answer