-
24 Jan 2012 9:03 PM #1
Answered: how to add event listener for a item like select field in sencha touch
Answered: how to add event listener for a item like select field in sencha touch
hi all,
i have one item like this
Now if i want to add a listener to that item what i have to do.Code:items:[{ xtype: 'selectfield', id:'sector', name : 'mode', label: 'Sector', valueField : 'mode', displayField : 'title', store : sectorStore, }]
whenever change is made in that item i wan to perform some action for that how can we do?
-
Best Answer Posted by Sasha172
If you check the API there is a "change" event that is fired just before the value is changed
change( Ext.form.Text this, Mixed newValue, Mixed oldValue )
Fires just before the field blurs if the field value has changed.
Parameters- this : Ext.form.TextThis field
- newValue : MixedThe new value
- oldValue : MixedThe original value
- this : Ext.form.TextThis field
-
25 Jan 2012 10:51 AM #2Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- Frederick MD, NYC, DC
- Posts
- 16,169
- Vote Rating
- 28
- Answers
- 83
The API describes the events for this type of input field.
Have you checked it?
Jay Garcia @ModusJesus || Modus Create co-founder
Ext JS in Action author
Sencha Touch in Action author
Get in touch for Ext JS & Sencha Touch Touch Training
We are also working on Video-based Sencha Touch training: Check it out here.
-
31 Jan 2012 3:23 AM #3
If you check the API there is a "change" event that is fired just before the value is changed
change( Ext.form.Text this, Mixed newValue, Mixed oldValue )
Fires just before the field blurs if the field value has changed.
Parameters- this : Ext.form.TextThis field
- newValue : MixedThe new value
- oldValue : MixedThe original value
- this : Ext.form.TextThis field


Reply With Quote