Examples of SpringComponentInjector


Examples of org.apache.wicket.spring.injection.annot.SpringComponentInjector

    {
      super.init();

      try
      {
        new SpringComponentInjector(this);
      }
      catch (Exception ex)
      {
        fail("does not work with application-specific context");
      }
View Full Code Here

Examples of org.apache.wicket.spring.injection.annot.SpringComponentInjector

  @Override
  protected void init() {
    log.debug("Bringing Wicket application online.");
   
    super.init();
    getComponentInstantiationListeners().add(new SpringComponentInjector(this));
    new AnnotatedMountScanner().scanPackage("${package}").mount(this);

    getMarkupSettings().setDefaultMarkupEncoding(DEFAULT_ENCODING);
    getRequestCycleSettings().setResponseRequestEncoding(DEFAULT_ENCODING);
   
View Full Code Here

Examples of org.apache.wicket.spring.injection.annot.SpringComponentInjector

    private ApplicationContext applicationContext;

    @Override
    protected void init() {
        super.init();
        addComponentInstantiationListener(new SpringComponentInjector(this, applicationContext, true));

        getMarkupSettings().setDefaultMarkupEncoding(DEFAULT_ENCODING);
        getRequestCycleSettings().setResponseRequestEncoding(DEFAULT_ENCODING);

        mountBookmarkablePages();
View Full Code Here

Examples of org.apache.wicket.spring.injection.annot.SpringComponentInjector

    getRequestCycleListeners().add(new GlobalExceptionHandler());
  }

  private void setupSpring() {
    getComponentInstantiationListeners().add(new SpringComponentInjector(this));
  }
View Full Code Here

Examples of org.apache.wicket.spring.injection.annot.SpringComponentInjector

    AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext();
    ctx.scan("org.wicketTutorial.ejbBean");
    ctx.refresh();
   
    getComponentInstantiationListeners().add(new SpringComponentInjector(this, ctx));
  }
View Full Code Here

Examples of org.apache.wicket.spring.injection.annot.SpringComponentInjector

  {
    getDebugSettings().setDevelopmentUtilitiesEnabled(true);

    // THIS LINE IS IMPORTANT - IT INSTALLS THE COMPONENT INJECTOR THAT WILL
    // INJECT NEWLY CREATED COMPONENTS WITH THEIR SPRING DEPENDENCIES
    getComponentInstantiationListeners().add(new SpringComponentInjector(this));
  }
View Full Code Here

Examples of org.apache.wicket.spring.injection.annot.SpringComponentInjector

    public static final String IMG_SUFFIX = ".png";

    @Override
    protected void init() {
        getComponentInstantiationListeners().add(new SpringComponentInjector(this));

        getResourceSettings().setThrowExceptionOnMissingResource(true);

        getSecuritySettings().setAuthorizationStrategy(new RoleAuthorizationStrategy(this));
        getSecuritySettings().setUnauthorizedComponentInstantiationListener(this);
View Full Code Here

Examples of org.apache.wicket.spring.injection.annot.SpringComponentInjector

     *
     * @see <a href="http://cwiki.apache.org/WICKET/spring.html#Spring-AnnotationbasedApproach">http://cwiki.apache.org/WICKET/spring.html#Spring-AnnotationbasedApproach</a>
     */
    protected void initSpring()
    {
        getComponentInstantiationListeners().add(new SpringComponentInjector(
            this, getApplicationContext(), true
        ));
    }
View Full Code Here

Examples of org.apache.wicket.spring.injection.annot.SpringComponentInjector

      getResourceSettings().setThrowExceptionOnMissingResource(false); // Don't throw MissingResourceException for
      // missing i18n keys in production mode.
    }
    getApplicationSettings().setPageExpiredErrorPage(PageExpiredPage.class); // Don't show expired page.
    // getSessionSettings().setMaxPageMaps(20); // Map up to 20 pages per session (default is 5).
    getComponentInstantiationListeners().add(new SpringComponentInjector(this));
    getApplicationSettings().setInternalErrorPage(ErrorPage.class);
    // getRequestCycleSettings().setGatherExtendedBrowserInfo(true); // For getting browser width and height.

    // Select2:
    // final ApplicationSettings select2Settings = ApplicationSettings.get();
View Full Code Here

Examples of org.apache.wicket.spring.injection.annot.SpringComponentInjector

    @Override
    protected void init()
    {
      super.init();
      final ClassPathXmlApplicationContext context = getTestConfiguration().getApplicationContext();
      getComponentInstantiationListeners().add(new SpringComponentInjector(this, context, true));
      getResourceSettings().getStringResourceLoaders().add(new BundleStringResourceLoader(WicketApplication.RESOURCE_BUNDLE_NAME));
      final ConfigurableListableBeanFactory beanFactory = context.getBeanFactory();
      beanFactory.autowireBeanProperties(this, AutowireCapableBeanFactory.AUTOWIRE_BY_NAME, false);
      UserXmlPreferencesCache.setInternalInstance(userXmlPreferencesCache);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.