VAADIN 7: What is the simplest way to refresh a Vaadin View in 5 minute intervals?

前端 未结 1 1424
滥情空心
滥情空心 2021-01-23 14:45

I\'m trying to implement an automatic refresh on a List of components in a Vaadin view. The list gets its contents from a database. I can refresh the list with a button, that is

相关标签:
1条回答
  • 2021-01-23 15:31

    You could do so that you call

    myUI.setPollInterval(300000);
    

    when the view is activated, and you disable it by calling

    myUI.setPollInterval(-1);
    

    when another view is activated. If you use Vaadin Navigator, then you could use ViewChangeListener for handling the polling.

    0 讨论(0)
提交回复
热议问题