On Wed, 21 Sep 2011 13:19:51 +0200, nquirynen <[email protected]> wrote:

if I do
     registry.getService(PolicyValueProviderSource.class)
and pass this as a parameter to my DocumentGenerator's constructor it does work.
Is this the way to go then? (my knowledge of Tapestry IoC is very small)


Yes, that is the correct way to retrieve a service.
You could also define a DocumentGenerator service in your AppModule, and use "registry.getService(DocumentGenerator.class)" instead of "new DocumentGenerator(...)" Normally, you should not use "new" to instantiate a service; Tapestry should instantiate it for you and automatically inject dependencies.
But in your case this should work just fine.

Martin

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

Reply via email to