Author: mgrigorov
Date: Thu Nov  3 13:27:30 2011
New Revision: 1197103

URL: http://svn.apache.org/viewvc?rev=1197103&view=rev
Log:
WICKET-4194 update/improve javadocs of SpringComponentInjector and 
GuiceComponentInjector.


Modified:
    
wicket/trunk/wicket-guice/src/main/java/org/apache/wicket/guice/GuiceComponentInjector.java
    
wicket/trunk/wicket-spring/src/main/java/org/apache/wicket/spring/injection/annot/SpringComponentInjector.java

Modified: 
wicket/trunk/wicket-guice/src/main/java/org/apache/wicket/guice/GuiceComponentInjector.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket-guice/src/main/java/org/apache/wicket/guice/GuiceComponentInjector.java?rev=1197103&r1=1197102&r2=1197103&view=diff
==============================================================================
--- 
wicket/trunk/wicket-guice/src/main/java/org/apache/wicket/guice/GuiceComponentInjector.java
 (original)
+++ 
wicket/trunk/wicket-guice/src/main/java/org/apache/wicket/guice/GuiceComponentInjector.java
 Thu Nov  3 13:27:30 2011
@@ -19,9 +19,11 @@ package org.apache.wicket.guice;
 import org.apache.wicket.Application;
 import org.apache.wicket.Component;
 import org.apache.wicket.IBehaviorInstantiationListener;
+import org.apache.wicket.Session;
 import org.apache.wicket.application.IComponentInstantiationListener;
 import org.apache.wicket.behavior.Behavior;
 import org.apache.wicket.injection.IFieldValueFactory;
+import org.apache.wicket.model.Model;
 
 import com.google.inject.Guice;
 import com.google.inject.ImplementedBy;
@@ -35,12 +37,18 @@ import com.google.inject.Stage;
  * Add this to your application in its {@link Application#init()} method like 
so:
  * 
  * <pre>
- * addComponentInstantiationListener(new GuiceComponentInjector(this));
+ * getComponentInstantiationListeners().add(new GuiceComponentInjector(this));
  * </pre>
  * 
  * <p>
  * There are different constructors for this object depending on how you want 
to wire things. See
  * the javadoc for the constructors for more information.
+ * </p>
+ * <p>
+ * Only Wicket {@link Component}s and {@link Behavior}s are automatically 
injected, other classes
+ * such as {@link Session}, {@link Model}, and any other POJO can be injected 
by calling
+ * <code>Injector.get().inject(this)</code> in their constructor.
+ * </p>
  * 
  * @author Alastair Maw
  */

Modified: 
wicket/trunk/wicket-spring/src/main/java/org/apache/wicket/spring/injection/annot/SpringComponentInjector.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket-spring/src/main/java/org/apache/wicket/spring/injection/annot/SpringComponentInjector.java?rev=1197103&r1=1197102&r2=1197103&view=diff
==============================================================================
--- 
wicket/trunk/wicket-spring/src/main/java/org/apache/wicket/spring/injection/annot/SpringComponentInjector.java
 (original)
+++ 
wicket/trunk/wicket-spring/src/main/java/org/apache/wicket/spring/injection/annot/SpringComponentInjector.java
 Thu Nov  3 13:27:30 2011
@@ -39,9 +39,12 @@ import org.springframework.web.context.s
  * {@link SpringBean} annotations.
  * 
  * To install in yourapplication.init() call
- * <code>addComponentInstantiationListener(new 
SpringComponentInjector(this));</code> Non-wicket
- * components such as {@link Session}, {@link Model}, and any other pojo can 
be injected by calling
+ * <code>getComponentInstantiationListeners().add(new 
SpringComponentInjector(this));</code>
+ * <p>
+ * Only Wicket {@link Component}s and {@link Behavior}s are automatically 
injected, other classes
+ * such as {@link Session}, {@link Model}, and any other POJO can be injected 
by calling
  * <code>Injector.get().inject(this)</code> in their constructor.
+ * </p>
  * 
  * @author Igor Vaynberg (ivaynberg)
  * @author <a href="mailto:[email protected]";>Justin Lee</a>


Reply via email to