On Tue, 7 Feb 2012 16:08:37 +0100
Gaetan Zoritchak <[email protected]> wrote:

> Hi all,
> 
> I use guice in my applications. I need to inject some code (service)
> in a DynamicImageResource. It is not straightforward because a
> Resource is not a component.
> 
> Does anybody has already done that? What would be the best way?

You can call the Injector directly in your constructor:

Injector.get().inject(this);

The effect is the same as in Components: It will inject all your
annotated fields.

Carl-Eric
www.wicketbuch.de

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to