UTILS-17
[utils] / wicket / joe / src / main / java / org / wamblee / wicket / inject / ComponentInstantiationInjector.java
index cdda947daf8d3b4e8ab348e6a325605f499360d7..d4bb39dc5c2e501a1d7fc35932068fa9569f93f8 100644 (file)
@@ -29,12 +29,12 @@ import org.wamblee.inject.SimpleInjector;
  * for standard Java EE injection into components. Or, other injection
  * frameworks can be used.
  * </p>
- * 
+ * <p/>
  * <p>
  * To use this injector override {@link WebApplication#init()} and add the
  * listener:
  * </p>
- * 
+ * <p/>
  * <pre>
  * &#064;Override
  * protected void init() {
@@ -42,11 +42,10 @@ import org.wamblee.inject.SimpleInjector;
  *     addComponentInstantiationListener(new ComponentInstantiationInjector());
  * }
  * </pre>
- * 
+ *
  * @author Erik Brakkee
  */
-public class ComponentInstantiationInjector implements
-    IComponentInstantiationListener {
+public class ComponentInstantiationInjector implements IComponentInstantiationListener {
 
     private SimpleInjector injector;
 
@@ -60,7 +59,6 @@ public class ComponentInstantiationInjector implements
     @Override
     public void onInstantiation(Component aComponent) {
         injector.inject(aComponent);
-        aComponent.add(new InjectionBehavior());
+        aComponent.add(new InjectionBehavior(aComponent));
     }
-
 }