-
18 Jan 2013 8:36 AM #1
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!
-
18 Jan 2013 10:20 AM #2
-
21 Jan 2013 12:29 AM #3
I don't have any code, I just tried the example from the Sencha docs and does not work...
-
21 Jan 2013 4:49 AM #4
You need to set the "delegate" config to "field" inside the listeners node:
You can read more on event delegation at the following doc page:Code:... listeners: { delegate: 'field', change: function(field, newValue, oldValue){ console.log(newValue); } }
http://docs.sencha.com/touch/2-1/#!/...able-method-onSencha Inc
Andrea Cammarata, Solutions Engineer
CEO at SIMACS
@AndreaCammarata
www.andreacammarata.com
github: https://github.com/AndreaCammarata


Reply With Quote
