@Override public void onInstantiation(final Behavior behavior) { notify(new INotifier<IBehaviorInstantiationListener>() { @Override public void notify(IBehaviorInstantiationListener listener) { listener.onInstantiation(behavior); } }); }
/** * Creates a new Wicket GuiceComponentInjector instance, using the provided Guice * {@link Injector} instance. * * @param app * @param injector * @param wrapInProxies * whether or not wicket should wrap dependencies with specialized proxies that can * be safely serialized. in most cases this should be set to true. */ public GuiceComponentInjector(final Application app, final Injector injector, final boolean wrapInProxies) { app.setMetaData(GuiceInjectorHolder.INJECTOR_KEY, new GuiceInjectorHolder(injector)); fieldValueFactory = new GuiceFieldValueFactory(wrapInProxies); app.getBehaviorInstantiationListeners().add(this); bind(app); }
/** * Constructor */ public Behavior() { if (Application.exists()) { Application.get().getBehaviorInstantiationListeners().onInstantiation(this); } }
application.getBehaviorInstantiationListeners().add(behaviorInjector);
/** * Constructor */ public Behavior() { if (Application.exists()) { Application.get().getBehaviorInstantiationListeners().onInstantiation(this); } }
/** * Constructor * * @param webapp * wicket web application * @param ctx * spring's application context * * @param wrapInProxies * whether or not wicket should wrap dependencies with specialized proxies that can * be safely serialized. in most cases this should be set to true. */ public SpringComponentInjector(final WebApplication webapp, final ApplicationContext ctx, final boolean wrapInProxies) { Args.notNull(webapp, "webapp"); Args.notNull(ctx, "ctx"); // store context in application's metadata ... webapp.setMetaData(CONTEXT_KEY, ctx); fieldValueFactory = new AnnotProxyFieldValueFactory(new ContextLocator(), wrapInProxies); webapp.getBehaviorInstantiationListeners().add(this); bind(webapp); }
@Override public void onInstantiation(final Behavior behavior) { notify(new INotifier<IBehaviorInstantiationListener>() { @Override public void notify(IBehaviorInstantiationListener listener) { listener.onInstantiation(behavior); } }); }
getMarkupSettings().setDefaultMarkupEncoding("UTF-8"); OSGiInjector injector = new OSGiInjector(this); getBehaviorInstantiationListeners().add(injector); getResourceSettings().getStringResourceLoaders().add(new OSGiAwareBundleStringResourceLoader()); getApplicationSettings().setInternalErrorPage(CustomInternalErrorPage.class);
application.getBehaviorInstantiationListeners().add(new BehaviorInjector());
application.getBehaviorInstantiationListeners().add(new BehaviorInjector());
application.getBehaviorInstantiationListeners().add(new BehaviorInjector(container));