Martin did all the help.  I just pointed out why it doesn't work! :)

On Sun, May 18, 2008 at 9:34 AM, Stephan Koch
<[EMAIL PROTECTED]> wrote:
> martijn, james: thanks for the help!
>
> works like a charm now...
>
> -stephan
>
>
> Martijn Dashorst 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
>
>
> ---------------------------------------------------------------------
> 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