Saturday, April 14, 2007

Spring - WicketWiki

Spring - WicketWiki: "pre

* wicket-spring project is in the subversion alongside wicket
* also look at wicket-spring-examples, wicket-spring-annot, and wicket-spring-annot-examples projects.
* Some knowledge of spring is required
* In wicket the Page class is a subclass of Component, so from here on the word component can represent either a component or a page.
* This is only the first pass at the documentation so its far from perfect
* Feel free to add new content and fix any mistakes you find.


Most problems with injecting dependencies from an IOC container come from the following

1. wicket is an unmanaged framework
2. wicket components and models are often serialized

wicket is an unmanaged framework

Wicket does not manage the lifecycle of its components. This means that a page or a component can be created anywhere in the code by simply using the new operator. This makes it difficult to inject dependencies because it is difficult to intercept the creation of the component. A possible solution can be to use a singleton factory to create the components and subsequently inject them with dependencies. However, this approach is not very flexible because it is often more convinient to have specific constructors in components rather then the default empty constructo"