use of com.bedatadriven.rebar.appcache.client.AppCache in project activityinfo by bedatadriven.
the class AppCacheMonitor method start.
public static void start() {
AppCache appCache = AppCacheFactory.get();
appCache.addUpdateReadyHandler(new UpdateReadyEventHandler() {
@Override
public void onAppCacheUpdateReady() {
MessageBox.confirm(I18N.MESSAGES.newVersion(ClientContext.getAppTitle()), I18N.CONSTANTS.newVersionChoice(), new Listener<MessageBoxEvent>() {
@Override
public void handleEvent(MessageBoxEvent be) {
if (be.getButtonClicked().getItemId().equals(Dialog.YES)) {
Window.Location.reload();
}
}
});
}
});
}
Aggregations