Alexandre Neukirchen Alexandre Neukirchen - 1 year ago 124
Javascript Question

Prototype setValue function of the ExtJS

I have some programs and would like to put a validation whenever set to the text of a textfiled.
How to override the setValue function ExtJS?

Answer Source

You can try something like this:

Ext.form.field.Text.prototype.setValue = function(val) {
    var me = this,
        inputEl = me.inputEl;

    // Here your validation 

    return me;
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download