Directory

← Back

pulltorefresh }> add-on

An extension to Vaadin that provides a Java API for the pulltorefresh.js JS library.

Author

Rating

Popularity

<100

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);

Compatibility

(Loading compatibility data...)

Was this helpful? Need more help?
Leave a comment or a question below. You can also join the chat on Discord or ask questions on StackOverflow.

Version

Released
2023-08-25
Maturity
STABLE
License
Apache License 2.0

Compatibility

Framework
Vaadin 24
Browser
Browser Independent

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); ```
View on GitHub

pulltorefresh }> add-on version 0.0.1

Online