View Full Version : Bind an event to components of a specific type

1 Sep 2010, 11:40 PM
Hi all,
I would like to be able to bind an event (let's say click) to all Ext.form.DateField components I use on a page.
How can I select multiple components and bind an event to all of them? Is that possible?

It would be even better if it could be accomplished with a jQuery .bind()-like method that also binds to components that are added afterwards, but that's optional.

Thx a lot!

1 Sep 2010, 11:57 PM
In Ext you would write that as:

Ext.util.Observable.observeClass(Ext.form.DateField, {
click: function(){...}