PDA

View Full Version : Form Submit waitTitle



serverfreak1982
20 Feb 2012, 6:36 AM
Hi guys,

I'd like to set a default waitTitle for my form submit but it won't work.
First I tried it this way:


if(Ext.form.Action.Submit){
Ext.apply(Ext.form.Action.Submit.prototype, {
waitMsg : 'Bitte warten'
});
}

then this way:

if(Ext.form.Action.Submit){
Ext.form.Action.Submit.prototype.waitMsg = 'Bitte warten';
}

Both aren't working on my code. I never get a progress bar with my waitMsg.


form.getForm().submit({
url: 'api/eml/addAlias.php',
method: 'POST',
waitTitle: 'Speichern',
success: function(form, action) {
win.close();
grid.store.load({params: {domainID: cbDomains.getValue()}});
},
failure: function(form, action) {
obj = Ext.util.JSON.decode(action.response.responseText);
showAPIError(obj.errors.code, obj.errors.text);
}
});



What's wrong?
Regards
Patrick

mitchellsimoens
20 Feb 2012, 7:19 AM
The waitMsg isn't handled in Ext.form.Action.Submit, it's handled in Ext.form.BasicForm so you need to put it on the BasicForm instead of the Action.

serverfreak1982
20 Feb 2012, 1:08 PM
The waitMsg isn't handled in Ext.form.Action.Submit, it's handled in Ext.form.BasicForm so you need to put it on the BasicForm instead of the Action.

There is still something wrong

if(Ext.form.BasicForm.submit){
Ext.form.BasicForm.submit.prototype.waitMsg = 'bla';
Ext.form.BasicForm.submit.prototype.waitTitle = 'blubb';
}

if(Ext.form.BasicForm){
Ext.form.BasicForm.prototype.waitMsg = 'bla';
Ext.form.BasicForm.prototype.waitTitle = 'blubb';
}