there are too many gotchas like this with doing it from the inside. i would make the page constructors protected and create simple static factory methods that create the page and then do the injection.

-Igor


On 11/8/05, Christian Essl <[EMAIL PROTECTED]> wrote:
Yes you are right!

I was now more thinking of Igors proposal todo the 'injection' from the
outside:

MyComponent comp = new MyComponent("id");
//set this and that
SpringInitializer.initialize (comp,locator);

If you'd do it from the inside (as the original code) it is a different
story.

I don't know what is better. What do you think?

Christian


On Tue, 8 Nov 2005 16:36:51 +0100, Johan Compagner < [EMAIL PROTECTED]>
wrote:

>> Just of my head two further suggestions:
>> 1.) If a field is not null than do not inject anything. This way custom
>> injections could be done
>
>
>
> Fields are always null because they are not initialized yet by the sub
> class
>
> (when having a super class that does the injections)



--
Christian Essl





___________________________________________________________
Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de



-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to