Class EntryPointStarter


  • public final class EntryPointStarter
    extends Object
    Utility to start an entry point leveraging on deferred resources mode.
    This helps when the GWT application is leveraging on code splitting.

     GWT.runAsync(new RunAsyncCallback() {
            @Override
            public void onFailure(Throwable throwable) {
                    Window.alert("Code injection failed");
            }
     
            @Override
            public void onSuccess() {
                    EntryPointStarter.run(DeferredResources.INSTANCE, new Runnable() {
                            @Override
                            public void run() {
                                    // CHARBA charts and api...
                            }
                    });
            }
     });
     
    Author:
    Andrea "Stock" Stocchero
    • Method Detail

      • run

        public static void run​(Runnable runnable,
                               ChartEnvelop<DeferredResources> envelop)
        Start an entry point as a runnable.
        This runnable instance must contains all calls to chart.
        This helps when the GWT application is leveraging on code splitting.
        This is deprecated, use DeferredCharba.
        Parameters:
        runnable - the entry point instance as runnable
        envelop - envelop which contains the deferred resources instance to set