List of usage examples for com.google.gwt.ajaxfeed.client.impl Loader init
public static void init(final String apiKey, LoaderCallback apiCallback)
From source file:com.google.gwt.sample.feedreader.client.GwtFeedReader.java
License:Apache License
public void onModuleLoad() { // The first thing that we want to do is to get the Ajax Feed API // to download and initialize. All of the other initialization should // be deferred until the iframe kicks off Loader.init(getApiFeedKey(), new Loader.LoaderCallback() { public void onError(Throwable t) { Window.alert("Unable to initialize AJAX Feed API.\n" + t.getMessage()); t.printStackTrace();/*from w w w. j av a2s. co m*/ } public void onLoad() { onAjaxFeedLoad(); } }); // Make sure the Loader's modifications to the DOM have taken effect before // we do anything else. DeferredCommand.addPause(); DeferredCommand.addCommand(new Command() { public void execute() { initialize(); } }); }