Results 1 to 3 of 3

Thread: how to add event listener for a item like select field in sencha touch

  1. #1
    Sencha User
    Join Date
    Sep 2011
    Location
    India
    Posts
    56
    Vote Rating
    0
      0  

    Question Answered: how to add event listener for a item like select field in sencha touch

    hi all,
    i have one item like this
    Code:
    items:[{ xtype: 'selectfield',
    						id:'sector',
                            name : 'mode',
                            label: 'Sector',
                            valueField : 'mode',
                            displayField : 'title', 
                            store : sectorStore,						
    						}]
    Now if i want to add a listener to that item what i have to do.
    whenever change is made in that item i wan to perform some action for that how can we do?

  2. 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


  3. #2
    Sencha User jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    DC Area =)
    Posts
    16,364
    Answers
    102
    Vote Rating
    86
      0  

    Default

    The API describes the events for this type of input field.

    Have you checked it?

  4. #3
    Sencha User
    Join Date
    Aug 2011
    Location
    Mumbai, India
    Posts
    120
    Answers
    11
    Vote Rating
    4
      0  

    Default

    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


Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •