Package org.wicketstuff.javaee.injection
Class JavaEEComponentInjector
- java.lang.Object
-
- org.apache.wicket.injection.Injector
-
- org.wicketstuff.javaee.injection.JavaEEComponentInjector
-
- All Implemented Interfaces:
org.apache.wicket.application.IComponentInstantiationListener
public class JavaEEComponentInjector extends org.apache.wicket.injection.Injector implements org.apache.wicket.application.IComponentInstantiationListener
This injection must be initialized in the Wicket WebApplication in order to enable Java EE 5 resource injection in Wicket Pages Add the initialization in WebApplication's init() method, e.g. protected void init() { addComponentInstantiationListener(new JavaEEComponentInjector(this)); }- Author:
- Filippo Diotalevi
-
-
Constructor Summary
Constructors Constructor Description JavaEEComponentInjector(org.apache.wicket.protocol.http.WebApplication webapp)
ConstructorJavaEEComponentInjector(org.apache.wicket.protocol.http.WebApplication webapp, IJndiNamingStrategy namingStrategy)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
inject(Object object)
void
onInstantiation(org.apache.wicket.Component component)
-
-
-
Constructor Detail
-
JavaEEComponentInjector
public JavaEEComponentInjector(org.apache.wicket.protocol.http.WebApplication webapp)
Constructor- Parameters:
webapp
- wicket web application
-
JavaEEComponentInjector
public JavaEEComponentInjector(org.apache.wicket.protocol.http.WebApplication webapp, IJndiNamingStrategy namingStrategy)
Constructor- Parameters:
webapp
- - wicket web applicationnamingStrategy
- - a jndi naming strategy to lookup ejb references
-
-
Method Detail
-
inject
public void inject(Object object)
- Specified by:
inject
in classorg.apache.wicket.injection.Injector
-
onInstantiation
public void onInstantiation(org.apache.wicket.Component component)
- Specified by:
onInstantiation
in interfaceorg.apache.wicket.application.IComponentInstantiationListener
-
-