Package org.jboss.errai.ioc.client.api

Examples of org.jboss.errai.ioc.client.api.Bootstrapper


public class Container implements EntryPoint {

  @Override
  public void onModuleLoad() {
    final Bootstrapper bootstrapper = GWT.create(Bootstrapper.class);
    final RootPanel rootPanel = RootPanel.get();
    final InterfaceInjectionContext ctx = bootstrapper.bootstrapContainer();

    for (Widget w : ctx.getToRootPanel()) {
      rootPanel.add(w);
    }
View Full Code Here


                }
              }
              MockIOCGenerator mockIOCGenerator = new MockIOCGenerator(packages);
             
              Class<? extends  Bootstrapper> cls = mockIOCGenerator.generate();
              Bootstrapper bs = cls.newInstance();
              return bs.bootstrapContainer();
            }
            catch (Exception e) {
              throw new RuntimeException("failed to run in emulated mode", e);
            }
          }
View Full Code Here

import com.google.gwt.user.client.ui.Widget;

public class Container implements EntryPoint {
  @Override
  public void onModuleLoad() {
    final Bootstrapper bootstrapper = GWT.create(Bootstrapper.class);
    final RootPanel rootPanel = RootPanel.get();
    final InterfaceInjectionContext ctx = bootstrapper.bootstrapContainer();

    for (Widget w : ctx.getToRootPanel()) {
      rootPanel.add(w);
    }
View Full Code Here

  public InterfaceInjectionContext boostrapContainer() {
    try {
      InitVotes.waitFor(Container.class);

      final Bootstrapper bootstrapper = GWT.create(Bootstrapper.class);
      final RootPanel rootPanel = RootPanel.get();
      final InterfaceInjectionContext ctx = bootstrapper.bootstrapContainer();

      CreationalContext rootContext = ctx.getRootContext();
      rootContext.finish();

      for (Widget w : ctx.getToRootPanel()) {
View Full Code Here

                }
              }
              MockIOCGenerator mockIOCGenerator = new MockIOCGenerator(packages);

              Class<? extends Bootstrapper> cls = mockIOCGenerator.generate();
              Bootstrapper bs = cls.newInstance();

              long tm = System.currentTimeMillis();
              InterfaceInjectionContext ctx = bs.bootstrapContainer();
              ctx.getRootContext().finish();

              System.out.println("bootstrapped simulated container in " + (System.currentTimeMillis() - tm) + "ms");
              return ctx;
            }
View Full Code Here

    super.gwtSetUp();

    CDI.removePostInitTasks();

    Bootstrapper bootstrapper = GWT.create(Bootstrapper.class);
    bootstrapper.bootstrapContainer();

    // Unfortunately, GWTTestCase does not call our inherited module's onModuleLoad() methods
    // http://code.google.com/p/google-web-toolkit/issues/detail?id=3791
    new CDIClientBootstrap().onModuleLoad();
  }
View Full Code Here

   * @param runnable
   *          The code to run once Errai IoC has finished bootstrapping in the
   *          context of the web page.
   */
  public static void afterIocInitialized(final Runnable runnable) {
    Bootstrapper bootstrapper = GWT.create(Bootstrapper.class);
    System.out.println("before bootstrapContainer");
    bootstrapper.bootstrapContainer();
    System.out.println("after bootstrapContainer");
    if (instance == null) {
      System.out.println(" ****** Look out! Null instance!");
    }
    runnable.run();
View Full Code Here

TOP

Related Classes of org.jboss.errai.ioc.client.api.Bootstrapper

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.