Fixed the Javadoc in 1.4.x & trunk. Thanks for reporting. /Gwyn On 11 March 2010 14:14, David Chang <david_q_zh...@yahoo.com> wrote:
> James, thanks for quick reply. I guess I am a little confused is that in > the init method, I use > > addComponentInstantiationListener(new SpringComponentInjector(this)); > > instead of > > add(new SpringComponentInjector(this)); > > as "Migrating" guide specified. The Guide-specified approach actually > generates compiler error. > > Regards. > > > --- On Thu, 3/11/10, James Carman <jcar...@carmanconsulting.com> wrote: > > > From: James Carman <jcar...@carmanconsulting.com> > > Subject: Re: A question about using Spring in Wicket 1.4 > > To: users@wicket.apache.org > > Date: Thursday, March 11, 2010, 9:09 AM > > yes > > > > On Thu, Mar 11, 2010 at 8:56 AM, David Chang <david_q_zh...@yahoo.com> > > wrote: > > > Yesterday I was looking at the page "Migrating to > > Wicket 1.4" > > > > > > http://cwiki.apache.org/WICKET/migrating-to-wicket-14.html > > > > > > Regarding SpringWebApplication, it says: > > > > > > SpringWebApplication has been deprecated in favor of > > SpringBean annotation. See SpringWebApplication javadoc for > > how to setup SpringBean based injection. > > > > > > I went to Wicket API about SpringWebApplication and it > > says: > > > > > > Deprecated. when using java5 it is preferrable to use > > SpringBean annotations for injection rather then this > > spring-specific application subclass with its helpers. To > > setup SpringBean add the following line to your > > WebApplication subclass init method add(new > > SpringComponentInjector(this)); > > > > > > Here is my way of using Spring in my wicket app. > > > > > > 1. In the init method: > > > > > > addComponentInstantiationListener(new > > SpringComponentInjector(this)); > > > > > > Please note that it is not: add(new > > SpringComponentInjector(this)); > > > > > > 2. In wicket components that access Spring beans: > > > > > > @SpringBean > > > private SupportService supportService; > > > > > > > > > Am I doing Spring in Wicket right way? > > > > > > Thanks for input! > > > > > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > > > For additional commands, e-mail: users-h...@wicket.apache.org > > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > > For additional commands, e-mail: users-h...@wicket.apache.org > > > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >