• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

In GWT Alert Message Box issue

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

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?
 
Bartender
Posts: 1810
28
jQuery Netbeans IDE Eclipse IDE Firefox Browser MySQL Database Chrome Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Rajesh Prabhu
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
But I need to intimate end user with message box.
 
J. Kevin Robbins
Bartender
Posts: 1810
28
jQuery Netbeans IDE Eclipse IDE Firefox Browser MySQL Database Chrome Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can you use a regular JavaScript message box, or a jQuery dialog?

I'm not familiar enough with GWT to help much with this one. Maybe Bear can help when he gets here in a couple of hours.
 
Rajesh Prabhu
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Okay Thank you
 
Sheriff
Posts: 67747
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry cannot help. My view of GWT is a pretty low one. I have moved this tot he GWT forum where those familiar with GWT might see this.
 
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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() ?
 
Rajesh Prabhu
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, I have tried but it's not working. I am getting Alert Box again and again and it's not redirecting to login page. I am getting same Alert Box.
 
Maneesh Godbole
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please post your SSCCE so we can take a look
 
Rajesh Prabhu
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here it is,





 
Maneesh Godbole
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Rajesh Prabhu wrote:Here it is,







I wrote:Did you try switching to Window#alert() ?


 
reply
    Bookmark Topic Watch Topic
  • New Topic