Example usage for com.google.gwt.gwtpages.client.page AsyncPageCallback onFailure

List of usage examples for com.google.gwt.gwtpages.client.page AsyncPageCallback onFailure

Introduction

In this page you can find the example usage for com.google.gwt.gwtpages.client.page AsyncPageCallback onFailure.

Prototype

void onFailure(Throwable cause);

Source Link

Document

Event called if an error occurs while loading the page

Usage

From source file:hudson.gwtmarketplace.client.pages.MainPage.java

License:Open Source License

@Override
public void onEnterPage(PageParameters parameters, PageRequestSession session,
        final AsyncPageCallback callback) {
    callback.waitForAsync();//  ww w .j av a2 s.c  om
    new GetTopsCommand() {
        @Override
        public void onSuccess(Top10Lists result) {
            callback.onSuccess();
            refresh(result);
        }

        public void onFailure(Throwable e) {
            super.onFailure(e);
            callback.onFailure(e);
        };
    }.execute();

    if (!blogfeedLoaded) {
        Feed f = new Feed();
        f.getFeed("http://feeds.feedburner.com/blogspot/NWLT?format=xml", this);
    }
}