PDA

View Full Version : Form Submit Timeouts



thomyorke
10 Jan 2011, 1:24 PM
I'm submitting a form via AJAX and it seems to be timing out after 30 seconds. Checked the API, didn't see a timeout property for the FormPanel class, how would I go about increasing it from 30 seconds?

Here's a sample of what I have:


var myForm = new Ext.form.FormPanel({
scroll: 'vertical',
url: 'myURL.jsp',
items: [
{
....
}
],
listeners : {
submit : function(form, result){
console.log('success!!', Ext.toArray(arguments));
},
exception : function(form, result){
console.log('failure', Ext.toArray(arguments));
}
}
});

mitchellsimoens
10 Jan 2011, 4:02 PM
I think the better question is, why is it taking 30 seconds?

thomyorke
10 Jan 2011, 4:41 PM
I think the better question is, why is it taking 30 seconds?
There's quite a bit of logic on the back-end for this form submission, plus this is currently running in our QA environment, which isn't as speedy as production.

Hopefully someone can shed some light on this.

thomyorke
11 Jan 2011, 10:46 AM
bump

mitchellsimoens
12 Jan 2011, 7:23 AM
Sencha Touch doesn't have BasicForm. That's Ext JS.

A submit in a form is just a Ext.Ajax.request(). So if you look at Ext.Ajax it extends Ext.data.Connection which has a timeout config.

thomyorke
12 Jan 2011, 2:01 PM
Sencha Touch doesn't have BasicForm. That's Ext JS.

A submit in a form is just a Ext.Ajax.request(). So if you look at Ext.Ajax it extends Ext.data.Connection which has a timeout config.

Yeah, I got that far and saw that, but couldn't get the syntax correct.

I'm sure this is totally wrong, but this is what I came up with, if you can lend a hand on this, I'd appreciate it!



{
text: 'Save',
ui: 'confirm',
handler: function() {
Ext.getCmp('myForm').submit({
waitMsg : {message:'Submitting', cls : 'demos-loading'},
timeout: 90000
});
}
}

dac0nvu
18 Jan 2011, 11:47 AM
I'd be interested in this also. This syntax doesn't work for me. How do you get a hold of the Ajax request when all you're dealing with is a FormPanel?

Tyorke
28 Feb 2011, 1:42 PM
Still haven't figured this one out. Anyone?