injector.getDocumentListPresenter();
RootPanel.get(CONTENT_DIV_ID).add(appPresenter.getDisplay().asWidget());
appPresenter.bind();
Window.enableScrolling(true);
// eager load document list
final EventBus eventBus = injector.getEventBus();
GetDocumentList action =
new GetDocumentList(injector.getLocation().getQueryDocuments());
documentListPresenter.showLoading(true);
final Stopwatch stopwatch = new Stopwatch().start();
injector.getDispatcher().execute(action,
new AsyncCallback<GetDocumentListResult>() {
@Override
public void onFailure(Throwable caught) {
eventBus.fireEvent(new NotificationEvent(
NotificationEvent.Severity.Error,
"Failed to load documents"));
documentListPresenter.showLoading(false);
stopwatch.stop();
}