Threaded View

  1. #1
    Sencha User
    Join Date
    Jun 2011
    Location
    India
    Posts
    28
    Vote Rating
    2
    tanmayasahu is on a distinguished road

      0  

    Default Answered: Combobox Should have a option for don't fire the change Event when using setValue()

    Answered: Combobox Should have a option for don't fire the change Event when using setValue()


    Hi ExtJS Dev Team,
    I am facing a issue with combobox setValue() method. My requirement is not to fire the change event of combobox, when I am setting the value using setValue(). Any way I have solved the problem by overriding the the setValue() method. But I think it is better to give a optional boolean parameter in the setValue() to use or avoid the change event.

    Thanks...

  2. Please see the following:

    Code:
    Ext.application({
        name : 'Fiddle',
    
        launch : function() {
    
            var states = Ext.create('Ext.data.Store', {
                fields: ['abbr', 'name'],
                data : [
                    {"abbr":"AL", "name":"Alabama"},
                    {"abbr":"AK", "name":"Alaska"},
                    {"abbr":"AZ", "name":"Arizona"}
                ]
            });
            
            var combo = Ext.create('Ext.form.ComboBox', {
                fieldLabel: 'Choose State',
                store: states,
                queryMode: 'local',
                displayField: 'name',
                valueField: 'abbr',
                renderTo: Ext.getBody()
            });
            
            combo.on('change', function(combo){
               console.log('--- change ---'); 
               console.log(combo.getValue()); 
            });
            
            combo.setValue('AK');
            
            setTimeout(function(){
                console.log('--- set raw ---'); 
    	        combo.setRawValue('AZ');
    	        console.log(combo.getValue()); // value, but no change event
            },1000);
    
        }
    });

Thread Participants: 1

Tags for this Thread

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