Re: Final fields not getting inited?

2008-05-05 Thread Johan Compagner
> > Ah, that explains it. I was under the assumption objects where created > using Class.forName().newInstance() or some such, then > instantiationListeners where run on them. Better put @Inject at the > field level for Guice > just curious.. how did you get to that assumption? If you do in your c

Re: Final fields not getting inited?

2008-05-05 Thread Ståle Undheim
On Mon, May 5, 2008 at 2:12 PM, lars vonk <[EMAIL PROTECTED]> wrote: > This is constructor ordering issue. When constructing an object in Java, at > first the superclass constructor is executed and the object's own > constructor. Since the ComponentInstantionListener is executed by the * > supe

Re: Final fields not getting inited?

2008-05-05 Thread lars vonk
This is constructor ordering issue. When constructing an object in Java, at first the superclass constructor is executed and the object's own constructor. Since the ComponentInstantionListener is executed by the * superclass* of your Page, which will call your init method (annotated by @Inject), t

Final fields not getting inited?

2008-05-05 Thread Ståle Undheim
I have just started using Wicket, and I use Guice for bindings. However, I got into a situation where private final fields initialized directly would be null. Here is the code in my WebApplication constructor: addComponentInstantiationListener(new IComponentInstantiationListener() { p