{ bodyStyle : 'padding:5px 5px 0', autoScroll : true, fieldDefaults : { labelWidth : 150 }, applyMask : { msg: "Updating..." }, defaults : { anchor : '-20', // to leave some space for the scrollbar listeners : { // On "return" key, submit the form specialkey : { fn : function(field, event){ if (event.getKey() == 13) this.ownerCt.onApply(); } } } }, initComponent: function(){ // passing config options to BasicForm is possible via initialConfig only // see Ext.form.Panel documentation this.initialConfig = { // form tracks it's default field values so they can be reset() trackResetOnLoad: true, } if (!this.bbar && !this.readOnly) this.bbar = {xtype: 'toolbar'}; // an empty bbar by default, so that we can dynamically add buttons // Custom error reader. We don't use it to process form values, but rather to normalize the response from the server in case of "real" (iframe) form submit. ErrorReader = function(){}; ErrorReader.prototype.read = function(xhr) { var unescapeHTML = function(str) { return str.replace(/</g,'<').replace(/>/g,'>').replace(/&/g,'&'); } xhr.responseText = unescapeHTML(xhr.responseText.replace(/