PDA

View Full Version : Callback with Servlet



coooolmagic
2 Aug 2012, 2:19 AM
hi all

I am calling a java servlet which takes a while to respond. I want a progress bar / message shown until i have the response from servlet. Some how getting confused how to use this feature. I am using this code to call my servlet.



function clickHandlerFoSimpleReport(){
Ext.Msg.show({
title : "Simple Task Report.",
msg : "This report might take upto 10 minutes to show. Are you sure you want to perform the action?",
buttons : {yes : 'Yes, Show the Report', cancel : 'Cancel'},
icon : Ext.MessageBox.QUESTION,
fn : function(btn) {
if(btn == 'yes'){
document.location.href = "/accounts/simpleexcelreport";
}
}
});
}

coooolmagic
2 Aug 2012, 6:10 AM
not looking exact anwer.. any pointer?

scottmartin
2 Aug 2012, 6:49 AM
You can only have a progress that has a AGIF or cyclic progress as there is no way to determine how long it will take.
Wait dialog on:
http://dev.sencha.com/deploy/ext-4.1.0-gpl/examples/message-box/msg-box.html

Simply open it on call.. and close on response callback.

Scott.