Example usage for com.vaadin.client.metadata ConnectorBundleLoader get

List of usage examples for com.vaadin.client.metadata ConnectorBundleLoader get

Introduction

In this page you can find the example usage for com.vaadin.client.metadata ConnectorBundleLoader get.

Prototype

public static ConnectorBundleLoader get() 

Source Link

Usage

From source file:org.vaadin.alump.offlinebuilder.client.BuilderOfflineMode.java

License:Open Source License

@Override
protected void buildDefaultContent() {
    // Make sure metadata is loaded
    ConnectorBundleLoader.get().loadBundle(ConnectorBundleLoader.EAGER_BUNDLE_NAME, null);

    OfflineConnection.markOffline();/*from w w  w  .  j a va 2 s  .  co  m*/

    getPanel().clear();
    if (rootConnector == null) {
        rootConnector = GWT.create(ORootConnector.class);
    }

    if (rootConnector != null) {
        Widget rootWidget = rootConnector.getWidget();
        if (rootWidget != null) {
            getPanel().add(rootWidget);
            getOfflineFactory().readRootState(rootConnector);
        } else {
            HTML errorLabel = new HTML();
            errorLabel.setHTML("<h1>FAIL no root widget</h1>");
            getPanel().add(errorLabel);
        }
    } else {
        HTML errorLabel = new HTML();
        errorLabel.setHTML("<h1>FAIL to root connector</h1>");
        getPanel().add(errorLabel);
    }
}