i just refactored the wicket-contrib-spring project, here are the changes

* all jdk 5 stuff has been factored out into wicket-contrib-spring-jdk5 project so wicket-contrib-spring can compile with 1.4

* the injector for automatic dependencies is now aquired through a static methods of the InjectorHolder class. this makes it very easy to substitute your own injector, say for unit testing.

* SpringWebPage has been generalized and renamed to InjectableWebPage

* there is now an AnnotSpringWebApplication which automatically puts the AnnotSpringInjector into the holder class at startup so you dont have to. what this means is that in order to setup automatic injection of pages you need to do two things: let your application object extend the AnnotSpringWebApplication and let any pages you want to be injected extend InjectableWebPage.

* SpringWebApplication now has a few helper methods for creating spring proxies in case you do not want to use the injector mechanism

* There is a beginning of the ApplicationContextMock class that can be used to simplify unit testing ( this needs a lot more work maybe somone has some time )

* http://www.wicket-wiki.org.uk/wiki/index.php/Spring has been updated to reflect these changes as well as show an example of a unit test for a page that uses automatic injetion

====== migration guide for automatic injection users ======
extend AnnotSpringWebApplication instead of SpringWebApplication
change all references to SpringWebPage to InjectableWebPage
=============================================

thoughts, comments, ideas ?

-Igor

Reply via email to