Yes, it works. I use it in many places. Joni
On Tue, 2006-10-03 at 16:28 +0200, Matej Knopp wrote: > But it should. I don't see reason why this wouldn't work? If I recall > correctly it worked for me. > > -Matej > > Leszek Gawron wrote: > > Eelco Hillenius wrote: > >>> I just wanted to share another way of injecting spring services into > >>> wicket code. This one uses AOP. > >>> > >>> - o - Why another approach? - o - > >>> > >>> Using wicket-spring along with wicket-spring-annot works nicely for > >>> components (althought you have to remember not initializing it > >>> yourself) > >>> but does not work for other parts of application - models. Just ask > >>> your > >>> self how many times you have put a spring service into wicket page > >>> only > >>> to pass it to model constructed: > >> > >> Thanks for the contribution. It's always good to know multiple ways > >> of doing this. However, in this case I was wondering whether you > >> tried this? > >> > >> public class SomeModel extends SomeOtherModel { > >> > >> @SpringBean MyService service; > >> > >> public SomeModel() { > >> InjectorHolder.getInjector().inject(this); > >> } > >> } > > > > yep .. didn't work. Only Components get the dependencies injected. > > > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys -- and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user