Ext.define('erp.view.common.labelButton.Form',{ extend: 'Ext.form.Panel', alias: 'widget.erpLabelButtonFormPanel', id: 'labelbuttonform', region: 'center', frame : true, autoScroll : true, defaultType : 'textfield', labelSeparator : ':', fieldDefaults : { margin : '2 2 2 2', fieldStyle : "background:#FFFAFA;color:#515151;", labelAlign : "right", blankText : $I18N.common.form.blankText }, FormUtil: Ext.create('erp.util.FormUtil'), buttonAlign: 'center', buttons: [{ name: 'confirm', text: $I18N.common.button.erpConfirmButton, iconCls: 'x-button-icon-confirm', cls: 'x-btn-gray', style: { marginLeft: '10px' } },'-','-',{ text: $I18N.common.button.erpCloseButton, iconCls: 'x-button-icon-close', cls: 'x-btn-gray', handler: function(){ var main = parent.Ext.getCmp("content-panel"); main.getActiveTab().close(); } }], confirmUrl:confirmUrl, initComponent : function(){ var param = {caller: caller, condition: ''}; this.FormUtil.getItemsAndButtons(this, 'common/singleFormItems.action', param); this.callParent(arguments); //this.initFields(this); } });