Sencha touch,fieldset onChange Listener

时间:2016-05-10 10:06:19

标签: javascript extjs sencha-touch

每当用户在字段集上选择一个选项时,我只想console.log('some info'),我试过这对我不起作用。

                    {
                    xtype: 'fieldset', 
                    items: [{
                            id: 'selVehiclename',
                            xtype: 'selectfield', 
                            store:'itemvehicles',
                            valueField:'itemID',       
                            displayField: 'name'                                 
                            }],
                    listeners:{
                         change: function(slider, thumb, obj1, val) 
                         {
                             console.log('some info');
                         }
                    }
                }, 

1 个答案:

答案 0 :(得分:0)

Change没有fieldset听众。您应该在change

内收听selectfield个事件
{
                    xtype: 'fieldset', 
                    items: [{
                            id: 'selVehiclename',
                            xtype: 'selectfield', 
                            store:'itemvehicles',
                            valueField:'itemID',       
                            displayField: 'name',
 listeners:{
                         change: function(slider, thumb, obj1, val) 
                         {
                             console.log('some info');
                         }
                    }                                 
                            }],

                },