ContextRefreshedEvent (Re: Spring injection not working)

2008-07-24 Thread David Nedrow
On Jul 23, 2008, at 5:21 PM, James Carman wrote: The TestDataLoader is configured in the META-INF/beans.xml file: http://svn.carmanconsulting.com/public/wicket-advanced/trunk/src/main/resources/META-INF/beans.xml It's injected that way OK, I see that. I actually asked the wrong question.

Re: Spring injection not working

2008-07-23 Thread James Carman
The TestDataLoader is configured in the META-INF/beans.xml file: http://svn.carmanconsulting.com/public/wicket-advanced/trunk/src/main/resources/META-INF/beans.xml It's injected that way On Wed, Jul 23, 2008 at 5:10 PM, David Nedrow <[EMAIL PROTECTED]> wrote: > > On Jul 23, 2008, at 3:23 PM, Jam

Re: Spring injection not working

2008-07-23 Thread David Nedrow
On Jul 23, 2008, at 3:27 PM, landry soules wrote: Actually, if the class using userDAO doesn't extend Component, you have to add InjectorHolder.getInjector().inject(this) in the constructor of the calling class. Is that in addition to addComponentInstantiationListener(), or in pla

Re: Spring injection not working

2008-07-23 Thread David Nedrow
On Jul 23, 2008, at 3:23 PM, James Carman wrote: Try downloading my example code from: http://svn.carmanconsulting.com/public/wicket-advanced/trunk/ See if there's anything you're doing differently. Hmm, I spoke too soon in my earlier reply. My AppSetup class is doing what your TestDataLo

Re: Spring injection not working

2008-07-23 Thread David Nedrow
On Jul 23, 2008, at 3:27 PM, landry soules wrote: Actually, if the class using userDAO doesn't extend Component, you have to add InjectorHolder.getInjector().inject(this) in the constructor of the calling class. Hmm, this may be the path. The class in question is just a utility cl

Re: Spring injection not working

2008-07-23 Thread James Carman
Oops! Yeah non-component classes aren't injected automatically. In this case, you might be able to use @configurable, as long as you don't need to pass the reference to anyone else. But, what you're doing might be easier. On 7/23/08, David Nedrow <[EMAIL PROTECTED]> wrote: > > On Jul 23, 2008,

Re: Spring injection not working

2008-07-23 Thread David Nedrow
On Jul 23, 2008, at 3:23 PM, James Carman wrote: Try downloading my example code from: http://svn.carmanconsulting.com/public/wicket-advanced/trunk/ James, I've been using your examples and they've been really helpful, with the exception of this. ;) As it turns out, Landry provided the

Re: Spring injection not working

2008-07-23 Thread landry soules
Actually, if the class using userDAO doesn't extend Component, you have to add InjectorHolder.getInjector().inject(this) in the constructor of the calling class. David Nedrow wrote: I believe (though I'm clearly wrong in that belief) that I have everything properly configured to allow sp

Re: Spring injection not working

2008-07-23 Thread James Carman
Try downloading my example code from: http://svn.carmanconsulting.com/public/wicket-advanced/trunk/ See if there's anything you're doing differently. On Wed, Jul 23, 2008 at 3:13 PM, David Nedrow <[EMAIL PROTECTED]> wrote: > On Jul 23, 2008, at 12:10 PM, James Carman wrote: > >> Have you tried

RE: Spring injection not working

2008-07-23 Thread Zappaterrini, Larry
Should UserDAO in the XML be userDAO? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 23, 2008 3:14 PM To: users@wicket.apache.org Subject: Re: Spring injection not working On Jul 23, 2008, at 12:10 PM, James Carman wrote: > Have you tr

Re: Spring injection not working

2008-07-23 Thread David Nedrow
On Jul 23, 2008, at 12:10 PM, James Carman wrote: Have you tried using @SpringBean? On Wed, Jul 23, 2008 at 12:04 PM, David Nedrow <[EMAIL PROTECTED]> wrote: I believe (though I'm clearly wrong in that belief) that I have everything properly configured to allow spring injection along the l

Re: Spring injection not working

2008-07-23 Thread James Carman
Have you tried using @SpringBean? On Wed, Jul 23, 2008 at 12:04 PM, David Nedrow <[EMAIL PROTECTED]> wrote: > I believe (though I'm clearly wrong in that belief) that I have everything > properly configured to allow spring injection along the lines of: > > import com.foo.dao.UserDAO; > @Spring > p