Results 1 to 2 of 2

Thread: One Button two Listeners: how to decide order?

  1. #1

    Default One Button two Listeners: how to decide order?

    Hi. Into a view called formbbar i've a button. The "click" event is managed by a controller

    Code:
    Ext.define('CS.controller.ControllerOne', {
        extend: 'Ext.app.Controller',
        
        init: function() {
       
            this.control({
        
                "formbbar [alias=btnSave]":{
                	click: function(){ alert("i'm one") }
                },
             
    
    
            });
    now i have another controller with the same event attached


    Code:
    Ext.define('CS.controller.ControllerTwo', {
        extend: 'Ext.app.Controller',
    
    
        init: function() {
    
    
            this.control({
           
                "formbbar [alias=btnSave]":{
                	click: function(){ alert("i'm two") }
                },
             
    
    
            });
    When i click on the button i see "i'm one" and after "i'm two". I need to invert the priority so that i see first "i'm two".
    Is it possibile?

  2. #2
    Sencha User
    Join Date
    Jun 2017
    Posts
    6
    Answers
    1

Similar Threads

  1. How to add order to listeners in config object
    By zwikske in forum Sencha Touch 2.x: Q&A
    Replies: 2
    Last Post: 9 Apr 2013, 11:57 PM
  2. Order of event listeners
    By grubi in forum Ext 3.x: Help & Discussion
    Replies: 6
    Last Post: 12 Oct 2009, 11:27 AM
  3. [OPEN] [CLOSED][3.0.0] Listeners triggering order
    By keypoint in forum Ext 3.x: Bugs
    Replies: 7
    Last Post: 14 Jul 2009, 5:16 AM
  4. event listeners order
    By dolittle in forum Ext 2.x: Help & Discussion
    Replies: 4
    Last Post: 16 Oct 2008, 6:46 AM
  5. Problem with order of Listeners
    By metramaster in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 10 Jun 2008, 6:28 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •