Looks like we can't reproduce the issue or there's a problem in the test case provided.
  1. #1
    Sencha Premium Member
    Join Date
    Nov 2007
    Location
    Germany
    Posts
    171
    Vote Rating
    0
    Michi_72 is on a distinguished road

      0  

    Default Grid / Panel is rendered twice

    Grid / Panel is rendered twice


    Hello,

    i have a problem after changing to 4.2.0 RC.

    Using the MVC-architecture for my app i realize that every panel is rendered twice und events are registered and executed twice.

    After clicking on the treepanel the controller is registered and content is loaded to the main tab.

    Now clicking on the actioncolumn of the grid, the event for this is executed twice.

    Has anyone similar behaviour? Any ideas how this come? How to prevent / debug?

    Thanks in advance.

    Michi

  2. #2
    Sencha Premium Member
    Join Date
    Nov 2007
    Location
    Germany
    Posts
    171
    Vote Rating
    0
    Michi_72 is on a distinguished road

      0  

    Default


    After searching i found out, that the init function of the controller are executed twice - and so the events are registered twice.

    I want to show how i add the controller:

    Clicking on the item of the menue-tree:

    PHP Code:
    this.getController(addTabController); //addTabController is the name of the controller 
    In the launch function of the maincontroller of the app this event is registered
    PHP Code:
    this.controllers.addListener('add'this.newControllerAddedthis); 
    The function "newControllerAdded" looks like
    PHP Code:
     newControllerAdded : function(idxctrlrtoken) {
                
    ctrlr.init();
            }, 
    Under 4.1.1 this all works fine - in 4.2.0 i have to comment the //ctrlr.init(); then it works!

    Has anyone an explanation for this behaviour?

    Thanks!

    Michi

  3. #3
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    17,004
    Vote Rating
    650
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    4.2.x will automatically initialize the controller when you call getController.
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

Thread Participants: 1