View Full Version : Ext.Messagebox.wait problem

28 Jun 2012, 11:58 PM
Hey guys! I am experiencing a weird issue! Maybe someone can either help or just let me know if this may be a bug!

I create an application. I send an ajax request and hence I place a wait message to let the user know that stuff is hapenning!

Once completed I use the .hide() method to hide the messagebox.

Then an application with a border layout gets presented!

When I launch a modal window and I attempt to run another ajax request (it is a saving of a form) I want to show another waiting message again! The problem is that now the content of the north region goes inside the waiting message!

It's as if the wait message is somehow bound to the northern region.

I removed the first waiting message when I first launch the application to test my thought! It worked perfectly! Is there some solution to this to allow the waiting message to be used wherever and whenever within the application? I do understand that i have a singleton object, but is there no way to detach it (for a better wording) from it's encapsulating component?

Thank you in advance...


29 Jun 2012, 12:14 AM

Instead of
msgBox = Ext.MessageBox.alert('Submitting data to the server', 'Please wait...');

I used:

var msgBox = new Ext.window.MessageBox('blah').wait('Submitting data to the server', 'Please wait...');

Any thoughts on this? Could we not have made this a little easier perhaps? lol

Thanks anyhow

29 Jun 2012, 12:44 AM
I did not know how much of a trouble can a simple messagebox be! This is absolutely nuts lol! I have tried to make the box reappear over and over, and all it does it goes at the back of the new component!

Guys is there no way to make this a litle easier? Without the need of having to sort out where this box the first time it is being used?

Or am I missing something?

I even tried the zindex manager! something like:


The messagebox still showed behind the actual component! Modal and all!

29 Jun 2012, 5:23 AM
I noticed that you're storing the MessageBox to variable msgBox. The MessageBox class is a singleton, so in general, so there no reason to track the class instance and you should never create a 'new' instance.

I call Ext.Msg.wait('Loading...', 'Please wait') and Ext.Msg.alert('Error', 'a Problem occurred.') in quite a few places throughout my app and never encounter the problem you've mentioned. I recommend inspecting your code, eliminating the msgBox var and any code which attempts to manipulate msgBox and use the MessageBox class as the singleton it's intended to be.

3 Jul 2012, 1:36 AM
hmmm i have gone through the entire application! Same issue all over! I do not have a var statement any longer!

But I take it that I CAN add the Ext.MessageBox.hide(); when I completed whatever task I wanted right?

Does the hideMode has anything to do with this?

Thanks for getting back to me though..!

3 Jul 2012, 4:52 AM
Yes, it's perfectly fine to call hide() at any time to do away with a message box.

Are you using any custom CSS (or third party components which include custom CSS) in your application?

10 Jul 2012, 10:22 AM
Hi - I got it right! It was a problem with the way I was calling the box in the sequence the application was being launched! Ultimately It was just so strange the way it was behaving and it gave no errors hehehe!

But thank you for your support!