1. #1
    Sencha User
    Join Date
    Feb 2012
    Posts
    183
    Vote Rating
    0
    Answers
    5
    pinidbest has a little shameless behaviour in the past

      0  

    Default Unanswered: Multiple controllers or one?

    Unanswered: 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???

  2. #2
    Sencha User
    Join Date
    Feb 2012
    Posts
    183
    Vote Rating
    0
    Answers
    5
    pinidbest has a little shameless behaviour in the past

      0  

    Default Found the answer

    Found the answer


    Never mind, Found the answer here...
    http://www.sencha.com/forum/showthre...of-Controllers