1. #1
    Ext User
    Join Date
    Mar 2010
    Vote Rating
    rhenkel is on a distinguished road


    Default add / change config items during runtime

    add / change config items during runtime


    I would like to add {enableKeyEvent:true} to a Textarea during runtime, because it is not available by Designer's Component Config (yet ?).

    That leads me to the general question how to do this and similar actions with arbitrary components.

    1. I could insert the config params into MyContainer.ui.js - but it will be overwritten every time I export it.
    2. I tried it successfully whith th following code in MyContainer.js:

    MyContainer = Ext.extend(MyContainerUi, {
        initComponent: function() {
            MyFieldUi = Ext.override(Ext.form.TextArea, {
                enableKeyEvents: true,
                initComponent: function() {
            this.textfld.on('keypress', this.onkeypress, this);
        onkeypress: function(fld, e) {
            var k = e.getKey();
            alert("You just presssed "+k+", but why?");

    However, this will affect the whole class, I think, but not only the particular object instance.

    Please help me to figure out how to get it.

    Thanks in advance

  2. #2
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Vote Rating
    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 aconran is a splendid one to behold



    Ext.override will affect all instances of that class as you stated above.

    Also, currently you are running this within the initComponent portion of the code which will run everytime. You only need to run this once.

    You can add the enableKeyEvents within your subclass of the Ui class. (That doesn't get overwritten.)

    We'll get the enableKeyEvents configuration added in a nearby release.
    Aaron Conran
    Sencha Architect Development Team

Thread Participants: 1

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi