In my servlet class I am pushing a GWT Message Box when I get an exception. This Message Box contains one OK button after user clicks on OK login Page will be displayed to the user. But in reality, what is happening is after clicking OK button in Message box again same MEssage Box is coming back and Login Page is not displayed. Issue is resolved when we manually clear cache in browser and reload page. Any fix?
I suspect the problem lies in the asynchronous nature of JavaScript. A regular JavaScript message box will stop browser execution, but a GWT message box does not; your script continues to run.
Try using "console.log" for your exception messages instead of a message box.
Moving to HTML/JavaScript forum.
"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do." -- Ted Nelson
Rajesh Prabhu wrote:
In my servlet class I am pushing a GWT Message Box when I get an exception. This Message Box contains one OK button after user clicks on OK login Page will be displayed to the user. But in reality, what is happening is after clicking OK button in Message box again same MEssage Box is coming back and Login Page is not displayed. Issue is resolved when we manually clear cache in browser and reload page. Any fix?
To start with MessageBox is not GWT but rather GWTX.
Did you try switching to Window#alert() ?