GWT detect GAE version changes and reload

2019-05-21 06:23发布

My users use my GWT app for an average of 40 minutes at a time, so when I upgrade the version number of the GAE backend, there's a long period of time when the version they're running in their browser doesn't match the version supporting it on the server.

Most functionality is broken, throwing IncompatibleRemoteServiceExceptions. How can I detect these on the client end? I don't see a way to get an error code out of the onFailure method.

1条回答
疯言疯语
2楼-- · 2019-05-21 06:31

When you receive an IncompatibleRemoteServiceException in onFailure() you need to prompt the user to reload the page. Spawn a DialogBox (modal & with glass) informing the user that the application is out of date and a button that, when clicked, calls Window.Location.reload()

查看更多
登录 后发表回答