And, this injection stuff could be yet another aspect that would be in
wicket-aspects!  It would be annotation-based, of course.

On Sun, May 18, 2008 at 9:07 AM, Martijn Dashorst
<[EMAIL PROTECTED]> wrote:
> On 5/18/08, Stephan Koch <[EMAIL PROTECTED]> wrote:
>>  I have to admit that I don't know how the property injection via
>> @SpringBean really works, if someone could elaborate on this I'd be
>> grateful.
>
> I assume you have read this:
>
> http://cwiki.apache.org/WICKET/spring.html
>
> In it, just before the automagic @SpringBean injection the document
> shows how to inject the beans manually:
>
>       EditContact c=new EditContact(userId);
>       InjectorHolder.getInjector().inject(c);
>
> So to extrapolate this into your problem:
>
> LDM ldm = new MyLDM();
> InjectionHolder.getInjector().inject(ldm);
>
> should do the trick, but is rather cumbersome and exposes the spring
> dependency. Therefore you'd rather do:
>
> public class MyLDM extends LDM {
>    public MyLDM() {
>        InjectorHolder.getInjector().inject(this);
>    }
> }
>
> Martijn
> --
> Buy Wicket in Action: http://manning.com/dashorst
> Apache Wicket 1.3.3 is released
> Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.3
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to