/** * Initializes the given WebApplication with the Spring framework. * * @param application * the WebApplication */ public static void initializeSpring(final WebApplication application) { application.getComponentInstantiationListeners() .add(new SpringComponentInjector(application)); }
protected void initWicketComponentInjection(final Injector injector) { // if serializable, then brings in dependency on cglib, and in turn asm. // This would block us from migrating to DN 4.0.x getComponentInstantiationListeners().add(new GuiceComponentInjector(this, injector, false)); }
protected void initFontAwesome() { getComponentInstantiationListeners().add(component -> { if (component instanceof Page) { component.add(new FontAwesomeResourceBehavior()); } }); }
protected void initCssBrowserSelector() { getComponentInstantiationListeners().add(component -> { if (component instanceof Page) { component.add(new CssBrowserSelectorResourceBehavior()); } }); }
protected void initFontAwesome() { getComponentInstantiationListeners().add(component -> { if (component instanceof Page) { component.add(new FontAwesomeResourceBehavior()); } }); }
protected void initBaseLayoutCss() { getComponentInstantiationListeners().add(component -> { if (component instanceof Page) { component.add(BaseLayoutCssResourceBehavior.get()); } }); } protected void initKendo()
protected void initCssBrowserSelector() { getComponentInstantiationListeners().add(component -> { if (component instanceof Page) { component.add(new CssBrowserSelectorResourceBehavior()); } }); }
protected void initBaseLayoutCss() { getComponentInstantiationListeners().add(component -> { if (component instanceof Page) { component.add(BaseLayoutCssResourceBehavior.get()); } }); } protected void initKendo()
@Override public void init(Application application) { // create dashboard context DashboardContext dashboardContext = new DashboardContext(); // store dashboard context in application application.setMetaData(DASHBOARD_CONTEXT_KEY, dashboardContext); // add dashboard context injector DashboardContextInjector dashboardContextInjector = new DashboardContextInjector(dashboardContext); application.getComponentInstantiationListeners().add(dashboardContextInjector); }
@Override public void init(Application application) { // create dashboard context DashboardContext dashboardContext = new DashboardContext(); // store dashboard context in application application.setMetaData(DASHBOARD_CONTEXT_KEY, dashboardContext); // add dashboard context injector DashboardContextInjector dashboardContextInjector = new DashboardContextInjector(dashboardContext); application.getComponentInstantiationListeners().add(dashboardContextInjector); }
private SimplifiedPaxWicketInjector(WicketTester tester) { tester.getApplication().getComponentInstantiationListeners().add( new PaxWicketSpringBeanComponentInjector(tester.getApplication(), applicationContext)); }
protected void initKendo() { getComponentInstantiationListeners().add(component -> { if (component instanceof Page) { component.add(new KendoResourceBehavior()); component.add(new WicketJQueryFocusPatchBehavior()); } }); }
/** * Preferred entry point for configuring your WicketApplication automatically. * @param application Your wicket application */ public static void configure(Application application) { application.getComponentInstantiationListeners().add(new AttributeModifyingInstantiationListener()); application.getComponentPostOnBeforeRenderListeners().add(new AttributeModifyingComponentVisitor()); }
/** * Preferred entry point for configuring your WicketApplication automatically. * @param application Your wicket application */ public static void configure(Application application) { application.getComponentInstantiationListeners().add(new AttributeModifyingInstantiationListener()); application.getComponentPostOnBeforeRenderListeners().add(new AttributeModifyingComponentVisitor()); }
protected void initKendo() { getComponentInstantiationListeners().add(component -> { if (component instanceof Page) { component.add(new KendoResourceBehavior()); component.add(new WicketJQueryFocusPatchBehavior()); } }); }
protected void initJQueryUI() { JQueryUILibrarySettings jqueryUiCfg = JQueryUILibrarySettings.get(); // Here we ensure that bootstrap is loaded before JQuery UI such that the // JQuery UI tooltip that we use e.g. on the annotation page takes precedence over // the less powerful Bootstrap tooltip (both are JQuery plugins using the same name!) jqueryUiCfg.setJavaScriptReference(BootstrapAwareJQueryUIJavaScriptResourceReference.get()); getComponentInstantiationListeners().add(component -> { if (component instanceof Page) { component.add(new JQueryUIResourceBehavior()); } }); }
@Override public void init(final Application application) { AnnotationEventDispatcherConfig config = new AnnotationEventDispatcherConfig(); application.setMetaData(ANNOTATION_EVENT_DISPATCHER_CONFIG_CONTEXT_KEY, config); AnnotationEventDispatcher dispatcher = new AnnotationEventDispatcher(); application.getComponentInstantiationListeners().add(dispatcher); application.getFrameworkSettings().add(dispatcher); }
@Override public <I> void hear(TypeLiteral<I> type, final TypeEncounter<I> encounter) { final Provider<Injector> injectorProvider = encounter.getProvider(Injector.class); encounter.register((InjectionListener<Object>) injected -> { WebApplication app = (WebApplication) injected; app.getComponentInstantiationListeners().add(new GuiceComponentInjector(app, injectorProvider.get())); }); } });
@Override protected void init() { super.init(); getComponentInstantiationListeners().add(new GuiceComponentInjector(this, modules())); mountPage("/home", Home.class); mountPage("/data/files", DataFiles.class); mountPage("/steps/find", FindSteps.class); mountPage("/story/run", RunStory.class); mountPage("/story/submit", SubmitStory.class); mountPage("/story/view", ViewStory.class); }
@Override protected void init() { super.init(); getComponentInstantiationListeners().add(new GuiceComponentInjector(this, modules())); mountPage("/home", Home.class); mountPage("/data/files", DataFiles.class); mountPage("/steps/find", FindSteps.class); mountPage("/story/run", RunStory.class); mountPage("/story/submit", SubmitStory.class); mountPage("/story/view", ViewStory.class); mountPage("/wiki/tree", WikiTree.class); }