GWT检测GAE版本更改并重新加载 [英] GWT detect GAE version changes and reload

查看:84
本文介绍了GWT检测GAE版本更改并重新加载的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的用户每次平均使用我的GWT应用程序40分钟,因此,当我升级GAE后端的版本号时,他们在浏览器中运行的版本不会有相当长的一段时间匹配服务器上支持它的版本。

大部分功能都被破坏,抛出IncompatibleRemoteServiceExceptions。我怎样才能在客户端检测到这些?我没有看到从onFailure方法中获取错误代码的方法。

解决方案

当您收到 IncompatibleRemoteServiceException onFailure()中,您需要提示用户重新加载页面。产生一个 DialogBox (modal& with glass)通知用户应用程序已过期,并且一个按钮点击后会调用 Window.Location.reload()


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.

解决方案

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()

这篇关于GWT检测GAE版本更改并重新加载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆