Directory

pulltorefresh }> add-on - Vaadin Add-on Directory

An extension to Vaadin that provides a Java API for the pulltorefresh.js JS library. pulltorefresh }> add-on - Vaadin Add-on Directory
An extension to Vaadin that provides a Java API for pulltorefresh JS library. The "pull to refresh" gesture triggers a callback on the Java side, where you can for example check for new data from the backend. Contains both extended version of Scroller component and a VerticalLayout that configures the body element. Note that this add-on only works on touch devices. If your app is for desktop devices only, ensure you have another UI pattern for those on desktop. Usage: ``` VerticalLayout layout = new VerticalLayout(); for(int i = 0; i< 100; i++) { layout.add(new Paragraph("This is a paragraph "+i+" in scroller.")); } Scroller scroller = new PullToRefreshScroller(() -> { layout.addComponentAsFirst(new Paragraph("Refreshed at "+ LocalTime.now())); }); scroller.setContent(layout); ```