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
Post a Comment