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

后端 未结 2 1580
轻奢々
轻奢々 2021-02-04 06:30

When clicking a button, my GWT application returns a PDF file embedded in an HTML page which looks something like:




        
2条回答
  •  甜味超标
    2021-02-04 06:53

    Did you see this stackoverflow question Detect when browser receives file download? Basically the answer given is that you set a cookie in the return response and wait on the client side for this cookie to be set. This can be done easily with GWT as it has a Scheduler (for the repeated timer check) and easy access to Cookies. You still need to make some server changes, but you don't have to create a background process.

提交回复
热议问题