Directory

← Back

LazyLoadWrapper

A lazy load wrapper for Vaadin GUI components

Author

Rating

Popularity

<100

Lazy Load Wrapper is a wrapper component for Vaadin GUI components that can reduce the time that it takes for a web application to load. The wrapper creates a lightweight placeholder on the client side that is replaced with the actual component when it becomes visible on the client side.

The API of the wrapper is designed so that it will require minimalistic extra coding when used. This is why almost all features of the wrapper can be accessed through the constructors. The default settings and automatic sizing feature of the placeholder will also cut down on the number of parameters that are required to set.

Vaadin 6 Version:

  • server-side lazy load
  • server-side lazy component provider
  • client-side lazy load (lazy draw)

Vaadin 7 alpha:

  • server-side lazy load
  • server-side lazy component provider
  • server-side reinit of LLW

Sample code

private void wrapperExample() {

        /*
         * Example of how to wrap a Panel inside a lazy load wrapper
         */
        Panel examplepanel = new Panel("This is your panel");
        examplepanel.addComponent(new Label("This is your content"));
        examplepanel.addComponent(new Button("A button"));

        /*
         * Set a size for the panel (the wrapper will automatically size the
         * placeholder if child has absolute sizes)
         */
        examplepanel.setWidth("300px");
        examplepanel.setHeight("200px");

        /* This is how you would normally add your panel to your application. */
        // mainWindow.addComponent(examplepanel);

        /* This is how you can easily wrap the component inside the wrapper; */
        mainWindow.addComponent(new LazyLoadWrapper(examplepanel));



         /*
         * If we want to, we can size the placeholder size manually.
         */
        Button aButton = new Button("Wrapped button");
        mainWindow.addComponent(new LazyLoadWrapper(aButton, "120px", "30px"));

}

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

First alpha version of LLW for Vaadin7.

  • Focus on server-side lazy loading
  • lazy draw (client-side lazy loading) is experimental and could be removed in future versions for V7
  • Experimental new feature: server-side hide/show wrapper (force reinitialisation of LLW from server)

Known issues:

  • Using wrapper inside a Table might in some cases cause the wrapper not to display its child even if the wrapper is visible.
  • client-side lazy loading is buggy especially when used for loading complex components like Table (will throw client-side exceptions)
Released
2013-02-03
Maturity
EXPERIMENTAL
License
Apache License 2.0

Compatibility

Framework
Vaadin 7.0+
Vaadin 6.4+ in 1.0.2
Vaadin 6.3+ in 1.0
Browser
Firefox
Safari
Google Chrome

LazyLoadWrapper - Vaadin Add-on Directory

A lazy load wrapper for Vaadin GUI components LazyLoadWrapper - Vaadin Add-on Directory
Lazy Load Wrapper is a wrapper component for Vaadin GUI components that can reduce the time that it takes for a web application to load. The wrapper creates a lightweight placeholder on the client side that is replaced with the actual component when it becomes visible on the client side. The API of the wrapper is designed so that it will require minimalistic extra coding when used. This is why almost all features of the wrapper can be accessed through the constructors. The default settings and automatic sizing feature of the placeholder will also cut down on the number of parameters that are required to set. Vaadin 6 Version: - server-side lazy load - server-side lazy component provider - client-side lazy load (lazy draw) Vaadin 7 alpha: - server-side lazy load - server-side lazy component provider - server-side reinit of LLW
Online Demo
Source Code
Issue Tracker
Discussion Forum

LazyLoadWrapper version 1.0
null

LazyLoadWrapper version 1.0.1
-Fixed bug where the wrapper could cause a Out-Of-Sync error when it was detached before rendering its child

LazyLoadWrapper version 1.0.2
recompiled version of 1.0.1 to support JDK 1.5

LazyLoadWrapper version 0.1 alpha
First alpha version of LLW for Vaadin7. - Focus on server-side lazy loading - lazy draw (client-side lazy loading) is experimental and could be removed in future versions for V7 - Experimental new feature: server-side hide/show wrapper (force reinitialisation of LLW from server) Known issues: - Using wrapper inside a Table might in some cases cause the wrapper not to display its child even if the wrapper is visible. - client-side lazy loading is buggy especially when used for loading complex components like Table (will throw client-side exceptions)

Online