java - GWT - easiest way to do a simple loading screen until file is loaded -


when clicking button, gwt application returns pdf file embedded in html page looks like:

<html><head></head> <body marginwidth="0" marginheight="0" bgcolor="rgb(38,38,38)"> <embed width="100%" height="100%" name="plugin"     src="http://myserver/?cmd=getmypdf" type="application/pdf"> </body> </html> 

problem can take while server create pdf file, want waiting screen loading animation can have pdf file download in background, , when file done, display page described above.

one obvious way display loading page, send asynchronous command server , once onsucceed method called, call page normal. downside i'd have add server-side logic making pdf creation work in background...

is there way client-side gwt api?

did see stackoverflow question detect when browser receives file download? answer given set cookie in return response , wait on client side cookie set. can done gwt has scheduler (for repeated timer check) , easy access cookies. still need make server changes, don't have create background process.


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -