Hello, I'm using ExtJS 3.0 and I would like to extend FormPanel or any solution so that everytime I show a form, the first field should get focus. I was thinking of adding a global listener (if such exists) like this perhaps:
afterrender: function() {
Ext.getCmp('formAddProgPaymentDoc').findByType('textfield')[0].focus(); //// Get the first textfield and focus it
}
Can this be done ? I have more than 40 forms and I don't want to add each one a listener, I would like to get it's listener automatically for each one.
Thanks.