PDA

View Full Version : Ext.FormPanel waitMsg



mjhaston
1 Nov 2011, 6:34 AM
Rookie question about waitMsg, but it's driving me crazy!

with ExtJS 3.3, how do I get my wait message to show up while this form is loading using detailsForm.form.load ?



var detailsForm = new Ext.FormPanel({
url : '/cgidev2p/jsonsbm001.pgm',
method : 'POST',
id : 'details-form',
baseParams : {
// recordID : Ext.getCmp('combo-ssn').getValue(),
dummy : 'details-form-dummy'
},
layout : 'fit',
monitorValid : true,
trackResetOnLoad : true,
border : false,
// frame : false,
listeners : {
clientvalidation : function(form) {
if (form.getForm().isDirty()) {
Ext.getCmp('saveBtn').enable();
// detailsForm.findField('contact-info').setTitle('*Contact
// Info');
} else {
Ext.getCmp('saveBtn').disable();
}
}
},

items : [{
xtype : 'tabpanel',
id : 'popup-panel',
activeTab : 0,
anchor : '100% 100%',
deferredRender : false,
layoutOnTabChange : true,
//waitMsgTarget : true,
defaults : {
layout : 'form',
labelWidth : 80,
defaultType : 'textfield',
bodyStyle : 'padding:5px',
hideMode : 'offsets'
},
items : [{

etc .......










showWithData : function(data) {

Ext.apply(detailsForm.form.baseParams, {
recordID : data
});
detailsForm.form.load({
url : '/cgidev2p/jsonStr013.pgm',
method : 'GET',
waitMsg : 'Loading...',
success : function(form, action) {
detailsForm.subheading.setTitle(detailsForm
.getForm().findField('subheading')
.getValue());

}
});
this.show();
}

mjhaston
2 Nov 2011, 5:59 AM
Just wondering if my issue is because of nesting?

My applications displays a window ... within the window is a formpanel that has a tabpanel.

Perhaps I don't have the waitMsgTarget : true at the right level?

mjhaston
2 Dec 2011, 9:57 AM
Solved by reading this post: http://www.sencha.com/forum/showthread.php?22247-waitMsg-formpanel&p=105411&viewfull=1#post105411


I show my window, then load the form and presto! Until then I never noticed the loading message behind the window. I just never saw it!