That statement will temporarily leave; get the file; and then come back to my app. Unfortunately, there is a small moment in time that my app does not like any button clicks. I’m trying to enable(false) then enable(true) the buttons to keep the app happy but hoping there is a cleaner way.
Two ways this will fail
If the user clicks on the buttons really fast
If there are more than 6 very large files (My Safari browser can only download 6 files at a time and then waits for a file to finish downloading before starting the next)
My question:
Any clean way to tell my App to Stop Receiving events until the browser is back and ready to receive them?? Will I be able to check the current URL and if it’s not my App’s URL to not do anything?
But is there a Listener or a way for me to know when the App is Back? Most the time it comes back within a split second but it could possibly be much longer.
Window BlurListener() and FocusListener() does not work on the Main Window. Does Anything get triggered when the App come’s back? Is this possible?
No - there is no such listener, and there is no easy way to do this that I would be aware of.
There has been discussion about trying to detect page reloads based on the same window being re-loaded within a short time, but nothing like that is currently planned at least for the Vaadin 6 branch. If using support for multiple browser tabs, the window needs to be identified when coming back for this to work - Vaadin 7 will make that somewhat easier, but probably would not solve the whole problem.