|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.wicketstuff.springreference.AbstractSpringReferenceSupporter
org.wicketstuff.springreference.SpringReferenceSupporter
public class SpringReferenceSupporter
Used by SpringReference and AbstractSpringDependencies to do the actual spring
bean lookups. This must be registered in the init() method of your wicket Application or
WebApplication otherwise SpringReference and AbstractSpringDependencies
will not work.
Example:
public class App extends WebApplication {
@Override
public Class extends Page> getHomePage() {
return HomePage.class;
}
@Override
protected void init() {
super.init();
getMarkupSettings().setDefaultMarkupEncoding(CharEncoding.UTF_8);
SpringReferenceSupporter.register(this); // <--
}
}
| Constructor Summary | |
|---|---|
SpringReferenceSupporter(ApplicationContext applicationContext)
Constructor. |
|
| Method Summary | |
|---|---|
protected static SpringReferenceSupporter |
get()
|
protected ApplicationContext |
getApplicationContext()
|
static void |
register(Application application,
SpringReferenceSupporter supporter)
Registers the passed in supporter with the wicket application. |
static void |
register(WebApplication application)
Creates and registers an instance of this class with the wicket web application. |
| Methods inherited from class org.wicketstuff.springreference.AbstractSpringReferenceSupporter |
|---|
clearCache, findAndSetInstance, findBeanName, getBeanDefinition |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SpringReferenceSupporter(ApplicationContext applicationContext)
applicationContext - where the spring bean will be searched for, not null| Method Detail |
|---|
public static void register(WebApplication application)
WebApplicationContextUtils.getRequiredWebApplicationContext(ServletContext) to get
spring web application context. If more fine grained registration is needed use
register(Application, SpringReferenceSupporter). If you want to use
SpringReference you have to use one of the register methods in your wicket
applications init().
application - wicket web application, not null
public static void register(Application application,
SpringReferenceSupporter supporter)
register(WebApplication).
application - wicket application, not nullsupporter - spring reference supporter. Null value means removal.protected static SpringReferenceSupporter get()
protected ApplicationContext getApplicationContext()
getApplicationContext in class AbstractSpringReferenceSupporter
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||