简体   繁体   English

Vaadin推送功能

[英]Vaadin Push feature

I've ran into a strange problem using Vaadin. 使用Vaadin遇到了一个奇怪的问题。 In my application I need to dynamicly push new data to the table viewed by the user. 在我的应用程序中,我需要动态地将新数据推送到用户查看的表中。 I've done some reading and it seems that I could achive just that with Vaadins' @Push feature. 我已经阅读了一些书,似乎可以通过Vaadins的@Push功能实现这一目标。

But as soon as I've added the @Push annotation to my UI class everything stopped working. 但是,一旦我将@Push注释添加到我的UI类中,一切就停止了工作。 What I mean by this is I'm getting that message when accessing the UI 我的意思是访问UI时收到该消息

Session Expired. Take note of any unsaved data, and click here or press ESC key to continue.

clicking on the message just refreshes the whole page. 单击该消息只会刷新整个页面。 I'm using Vaadin 8.0.6 and vaadingSpring 2.0.1, as well as Spring Boot 1.5.3 我正在使用Vaadin 8.0.6和vaadingSpring 2.0.1以及Spring Boot 1.5.3

Does anyone know how to solve this? 有谁知道如何解决这个问题?

Oh, I almost forgot. 哦,我差点忘了。 I've used this code as an example https://github.com/peholmst/vaadin4spring/blob/master/samples/push-sample/src/main/java/org/vaadin/spring/samples/push/PushUI.java 我已使用此代码作为示例https://github.com/peholmst/vaadin4spring/blob/master/samples/push-sample/src/main/java/org/vaadin/spring/samples/push/PushUI.java

I found Push (with Spring) hard to configure. 我发现Push(带有Spring)很难配置。 It was my fault, for sure, but I finally decided to drop it in favor of this simple extension which implements a client-based polling: https://vaadin.com/directory#!addon/timerextension-add-on 当然,这是我的错,但是我最终决定放弃它,转而使用此简单的扩展,该扩展实现了基于客户端的轮询: https : //vaadin.com/directory#! addon/ timerextension -add- on

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM