Author: pete.muir(a)jboss.org
Date: 2008-10-31 13:36:40 -0400 (Fri, 31 Oct 2008)
New Revision: 9471
Modified:
trunk/src/wicket/org/jboss/seam/wicket/WicketComponent.java
Log:
JBSEAM-3594, support injection in superclasses, thanks to Clint Popetz
Modified: trunk/src/wicket/org/jboss/seam/wicket/WicketComponent.java
===================================================================
--- trunk/src/wicket/org/jboss/seam/wicket/WicketComponent.java 2008-10-31 17:35:14 UTC
(rev 9470)
+++ trunk/src/wicket/org/jboss/seam/wicket/WicketComponent.java 2008-10-31 17:36:40 UTC
(rev 9471)
@@ -174,18 +174,21 @@
{
Class clazz = type;
scanClassEnclosureHierachy();
- for (Method method : clazz.getDeclaredMethods())
- {
- add(method);
+ while (clazz != Object.class) {
+ for (Method method : clazz.getDeclaredMethods())
+ {
+ add(method);
+ }
+ for (Field field : clazz.getDeclaredFields())
+ {
+ add(field);
+ }
+ for(Constructor<T> constructor : clazz.getDeclaredConstructors())
+ {
+ add(constructor);
+ }
+ clazz = clazz.getSuperclass();
}
- for (Field field : clazz.getDeclaredFields())
- {
- add(field);
- }
- for(Constructor<T> constructor : clazz.getDeclaredConstructors())
- {
- add(constructor);
- }
}
private void scanClassEnclosureHierachy()