java - How to use refresher addon in vaadin? -
java - How to use refresher addon in vaadin? -
i'm trying utilize refresher addon in vaadin. refresh method never executed. missing?
@vaadinui @preserveonrefresh public class rootui extends ui { @override protected void init(vaadinrequest request) { refresher.setrefreshinterval(500); refresher.addlistener(new chatrefreshlistener()); addextension(refresher); } public static final refresher refresher = new refresher(); public class chatrefreshlistener implements refreshlistener { @override public void refresh(final refresher source) { system.out.println("test"); //this never executed } } } @configuration @componentscan @enableautoconfiguration public class myapp extends springbootservletinitializer { public static void main(string[] args) { springapplication.run(myapp.class, args); } @override protected springapplicationbuilder configure(springapplicationbuilder application) { homecoming application.sources(myapp.class); } }
<vaadin.version>7.4.0.alpha2</vaadin.version>
first off, using extension in constant unsafe @ best, flat-out not work.
but importantly, i've deprecated refresher in favor of ui.setpollinterval()
introduced in vaadin 7.1. vaadin 7.2 (i think) introduced polllistener
, events each poll well.
i guess should create deprecation explicit refresher 100% integrated vaadin.
java spring vaadin vaadin4spring vaadin-refresher
Comments
Post a Comment