Package net.customware.gwt.presenter.client

Examples of net.customware.gwt.presenter.client.EventBus


                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();
                    }
View Full Code Here


        registerUserScriptCallbackHook();
    }

    private void registerUserScriptCallbackHook() {
        final EventBus eventBus = injector.getEventBus();
        UserScriptCallbackHook hook = new UserScriptCallbackHook();
        eventBus.addHandler(TransUnitUpdatedEvent.getType(), hook);
    }
View Full Code Here

TOP

Related Classes of net.customware.gwt.presenter.client.EventBus

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.