Clear Up
SharpKit Reference

BaseEvents Class

Namespace: Ext.form.field

Constructors

Name Description
BaseEvents(Object[])

Methods

Name Description
change(Field, object, object, object) Fires when the value of a field is changed via the setValue method.
dirtychange(Field, bool, object) Fires when a change in the field's isDirty state is detected.
errorchange(Labelable, JsString, object) Fires when the active error message is changed via setActiveError.
specialkey(Base, EventObject, object) Fires when any key related to navigation (arrows, tab, enter, esc, etc.) is pressed. To handle other keys see Ext.util.KeyMap. You can check Ext.EventObject.getKey to determine which key was pressed. For example:
var form = new Ext.form.Panel({
            ...
            items: [{
            fieldLabel: 'Field 1',
            name: 'field1',
            allowBlank: false
            },{
            fieldLabel: 'Field 2',
            name: 'field2',
            listeners: {
            specialkey: function(field, e){
            // e.HOME, e.END, e.PAGE_UP, e.PAGE_DOWN,
            // e.TAB, e.ESC, arrow keys: e.LEFT, e.RIGHT, e.UP, e.DOWN
            if (e.getKey() == e.ENTER) {
            var form = field.up('form').getForm();
            form.submit();
            }
            }
            }
            }
            ],
            ...
            });
            
validitychange(Field, bool, object) Fires when a change in the field's validity is detected.
writeablechange(Base, bool, object) Fires when this field changes its read-only status.
© Copyright 2005-2011 SharpKit. All rights reserved.