org.apache.wicket.spring.injection.annot
Class SpringComponentInjector
java.lang.Object
org.apache.wicket.injection.ComponentInjector
org.apache.wicket.spring.injection.annot.SpringComponentInjector
- All Implemented Interfaces:
- IComponentInstantiationListener
public class SpringComponentInjector
- extends ComponentInjector
IComponentInstantiationListener
that injects component properties annotated with
SpringBean
annotations.
To install in yourapplication.init() call
addComponentInstantiationListener(new SpringComponentInjector(this));
Non-wicket
components such as Session
, Model
, and any other pojo can be injected by calling
InjectorHolder.getInjector().inject(this)
in their constructor.
- Author:
- Igor Vaynberg (ivaynberg), Justin Lee
Constructor Summary |
SpringComponentInjector(WebApplication webapp)
Constructor used when spring application context is declared in the spring standard way and
can be located through
WebApplicationContextUtils.getRequiredWebApplicationContext(ServletContext) |
SpringComponentInjector(WebApplication webapp,
org.springframework.context.ApplicationContext ctx,
boolean wrapInProxies)
Constructor |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SpringComponentInjector
public SpringComponentInjector(WebApplication webapp)
- Constructor used when spring application context is declared in the spring standard way and
can be located through
WebApplicationContextUtils.getRequiredWebApplicationContext(ServletContext)
- Parameters:
webapp
- wicket web application
SpringComponentInjector
public SpringComponentInjector(WebApplication webapp,
org.springframework.context.ApplicationContext ctx,
boolean wrapInProxies)
- Constructor
- Parameters:
webapp
- wicket web applicationctx
- spring's application contextwrapInProxies
- whether or not wicket should wrap dependencies with specialized proxies that can
be safely serialized. in most cases this should be set to true.
Copyright © 2004-2011 Apache Software Foundation. All Rights Reserved.