On Fri, 19 Oct 2007, James Perry wrote:
> annotations. I am also interested to know if I should just keep an Spring
> ApplicationContext in Wicket's Application class, inject the proxy-based
> Service POJOs into the Application or just inject them into each component
> that needs to use my service's methods?
We have found it clearer to inject to each component,
otherwise each component gets a dependency to the Application
subclass which in turn gets dependencies to all services.
And you can easily inject to many non-Component classes, too
public class MyModel implements IModel {
@SpringBean(id = "myDao") private MyDao myDao;
public MyModel() {
InjectorHolder.getInjector().inject(this);
}
...
}
Best wishes,
Timo
--
Timo Rantalaiho
Reaktor Innovations Oy <URL: http://www.ri.fi/ >
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]