onSaveUserClick: function (button) {
var self = this;
var form = button.up('form');
if (form.isValid()) {
}
else {
Ext.Msg.alert('Status', 'Please fill vailid data !', function (btn, text) { });
return;
}
}
Thanks.
Markdown for AI
A clean, structured version of this page for AI assistants and LLMs.
We use cookies to ensure you have the best browsing experience on our website. By using our site, you
acknowledge that you have read and understood our
Cookie Policy &
Privacy Policy.
Ext.define('MyApp.view.UserForm', { extend: 'Ext.window.Window', xtype: 'UserForm', modal: true, layout: 'fit', height: 300, width: 400, title: 'UserForm', items: [ { xtype: 'form', bodyPadding: 5, items: [ { xtype: 'fieldset', title: 'User Info', defaults: { xtype: 'textfield', labelWidth: 100, width: 300 }, items: [ { name: 'UserId', hidden: true }, { fieldLabel: 'Name', name: 'UserName', sortable: true, allowBlank: false, msgTarget: 'side' }, { fieldLabel: 'Email', sortable: false, name: 'UserEmail', allowBlank: false, msgTarget: 'side' }, { fieldLabel: 'Phone', sortable: false, name: 'PhoneNumber', allowBlank: false, msgTarget: 'side' }, { fieldLabel: 'Address', sortable: false, name: 'Address', allowBlank: false, msgTarget: 'side' }, { fieldLabel: 'Password', name: 'Password', sortable: false, allowBlank: false, msgTarget: 'side' } ] } ], buttons: [ { text: 'Save', action: 'saveUser' } ] } ] });
onSaveUserClick: function (button) { var self = this; var form = button.up('form'); if (form.isValid()) { } else { Ext.Msg.alert('Status', 'Please fill vailid data !', function (btn, text) { }); return; } }