1. #1
    Sencha Premium Member
    Join Date
    May 2010
    Location
    Guatemala, Central America
    Posts
    1,181
    Vote Rating
    77
    ssamayoa is a jewel in the rough ssamayoa is a jewel in the rough ssamayoa is a jewel in the rough ssamayoa is a jewel in the rough

      0  

    Default Firing non custom events - work arround

    Firing non custom events - work arround


    I'm starting a new project in which I need my custom component called "TriggerFieldClick" which fires "triggerclick" event. Since SD currently doesn't allows to register non custom events in controllers, the work arround is to call again controller's control() method in init() after SD generated code:

    Code:
        onButtonClick: function(button, e, options) {
            alert("Click!");
        },
    
    
        init: function() {
            this.control({
                "mywindow #mybutton": {
                    click: this.onButtonClick
                }
            });
            // Non custom events...
            this.control({
                "mywindow #mytrigger": {
                    "triggerclick": this.triggerTest
                }
            });
        },
    
    
        triggerTest: function(e) {
            alert("Funcionó !");
        }
    I checked Controller, Application adn EventBus code to ensure that control() doesn't clear previos registered listeners.

    Regards.
    UI: Sencha Architect 3.x / ExtJS 4 MVC
    Server side: EJB 3.1 / CDI / JPA 2 / JAX-RS / JasperReports
    Application Server: Glassfish 3.1.x
    Databases: Oracle 10g & 11g / DB2 9 & 10 / Firebird 2.5

    If you like my answer please vote!

  2. #2
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    8,882
    Vote Rating
    101
    aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold

      0  

    Default


    This shouldn't be a problem and is an acceptable workaround in the interim.
    Aaron Conran
    @aconran
    Sencha Architect Development Team

Thread Participants: 1

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar