【发布时间】:2014-12-15 12:04:37
【问题描述】:
我有一个 vaadin 应用程序,我使用 SQLContainer 来显示数据库记录。 我想让 SQLcontainer 在发生任何数据库更改时自行更新的问题。 有人帮帮我吗?
【问题讨论】:
-
为什么要投反对票?当然,每次在他的数据库表中修改一行时,OP 都希望更新他的 vaadin 表。我还没有找到任何直接的解决方案。
-
根据this page 刷新功能是内置的:
The SQLContainer keeps continuously checking the amount of rows in the connected database table in order to detect external addition or removal of rows. By default, the table row count is assumed to remain valid for 10 seconds. This value can be altered from code; with setSizeValidMilliSeconds() in SQLContainer.这个我还没有验证。我也不知道是否检测到更新。 重要提示您需要使用 Push 以使刷新出现在客户端,无需用户交互。