Igor Vaynberg wrote:
i was just falling asleep and thought of something (still sleepy so dont
know if this will make sense in the morning). with all this talk of
testing why not borrow a page from spring's book. have a
IInitializingPage { void afterPropertiesSet(); } and have the injector
check for this and call it after its done populating the page. I know
this isnt as clean as spring because the order is a bit out of wack -
afterPropertiesSet is called before the constructor of the page is
finished but if you leave your constructor blank and move everything
into that method i think it should work. and you can have total control
over dependencies in unit tests w/out anything special just set the
injector to a noop injector and call afterPropertiesSet() yourself.
how does that sound? will this make things easier or dirtier?
-Igor
I've thought about it and it doesn't provide us any real advantage over
your InjectorLocator pattern right now. Using composition keeps
everything loosely coupled and pretty much transparent to the developer.
But we are just starting out on this project and haven't hit any
complications yet.
jim
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user