1. #1
    Sencha User
    Join Date
    Aug 2012
    Location
    Zurich
    Posts
    5
    Vote Rating
    0
    amanyosa is on a distinguished road

      0  

    Default Unanswered: Specify listeners on child components

    Unanswered: Specify listeners on child components


    Checking on the documentation, about formpanel

    http://docs.sencha.com/touch/2-0/#!/api/Ext.form.Panel

    I've found how to supposedly specify listeners on its child components, like this


    var form =Ext.create('Ext.form.Panel',{ listeners:{'> field':{ change:function(field, newValue, oldValue){ ed.set(field.getName(), newValue);}}}, items://as before});but for me does not work (with Sencha 2.1)

    Anybody has experience with this? Could you explain what exactly means the line '> field': ?

    Thanks in advance!

  2. #2
    Sencha User bluehipy's Avatar
    Join Date
    Mar 2010
    Location
    Romania
    Posts
    606
    Answers
    66
    Vote Rating
    26
    bluehipy will become famous soon enough bluehipy will become famous soon enough

      0  

    Default


    Quote Originally Posted by amanyosa View Post
    Checking on the documentation, about formpanel

    http://docs.sencha.com/touch/2-0/#!/api/Ext.form.Panel

    I've found how to supposedly specify listeners on its child components, like this


    var form =Ext.create('Ext.form.Panel',{ listeners:{'> field':{ change:function(field, newValue, oldValue){ ed.set(field.getName(), newValue);}}}, items://as before});but for me does not work (with Sencha 2.1)

    Anybody has experience with this? Could you explain what exactly means the line '> field': ?

    Thanks in advance!

    > field is a selector for the first child of type field, post your code for directions

  3. #3
    Sencha User
    Join Date
    Aug 2012
    Location
    Zurich
    Posts
    5
    Vote Rating
    0
    amanyosa is on a distinguished road

      0  

    Default


    I don't have any code, I just tried the example from the Sencha docs and does not work...

  4. #4
    Sencha - Services Team AndreaCammarata's Avatar
    Join Date
    Jun 2009
    Posts
    1,394
    Answers
    148
    Vote Rating
    22
    AndreaCammarata has a spectacular aura about AndreaCammarata has a spectacular aura about

      0  

    Default


    You need to set the "delegate" config to "field" inside the listeners node:

    Code:
    ...
    listeners: {
        delegate: 'field',
        change: function(field, newValue, oldValue){
             console.log(newValue);
        }
     }
    You can read more on event delegation at the following doc page:
    http://docs.sencha.com/touch/2-1/#!/...able-method-on
    Sencha Inc
    Andrea Cammarata, Solutions Engineer
    CEO at SIMACS

    @AndreaCammarata
    www.andreacammarata.com
    github: https://github.com/AndreaCammarata

    TUX components bundle for Sencha Touch 2.x.x
    http://www.tux-components.com/


Thread Participants: 2

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