PDA

View Full Version : Getting 'this.el is undefined' error once after upgrading to ExtJS4.1.1a



g.raghuvamshi
25 Sep 2012, 12:55 AM
Hi,

Greetings!

I am new to ExtJs.

I am getting the 'this.el is undefined' after upgrading to ExtJS4.1.1a. Kindly let me know where I am going wrong.

Code:

function() {
var originalInitValue = Ext.form.TextField.prototype.initValue;
Ext.override(Ext.form.TextField, {
initValue: function() {
originalInitValue.apply( this, arguments );
if (!isNaN(this.maxLength) && (this.maxLength *1) > 0 && (this.maxLength != Number.MAX_VALUE)) {
this.el.dom.maxLength = this.maxLength *1; //getting error here
}
}
}
);
}

thanks in advance..

redraid
25 Sep 2012, 5:23 AM
Text field not rendered at this time, move this to boxready (http://docs.sencha.com/ext-js/4-1/#!/api/Ext.form.field.Base-event-boxready)

g.raghuvamshi
25 Sep 2012, 8:42 PM
I am not finding the example to use boxready.

If possible, could you please provide sample code?

Thank you,