Hi

What you can do is pass the parameters to the componentProvider like this:

MyObject obj = new MyObject("bla");

componentProvider.newInstance(GeoService.class, obj, "some string")

So you would inject the ComponentProvider in your 'caller'-class (or factory) 
and instantiate the GeoService there.
But keep in mind that it's not possible to pass more than one instance of a 
type. So this won't work:

componentProvider.newInstance(GeoService.class, obj, "some string", "Guice 
won't be able to differentiate the two strings.")

But there are several ways to workaround this, e.g. by passing an array of 
strings, or some POJO with the two strings.

Hope this helps.

-- 
Context is everything: 
http://forum.magnolia-cms.com/forum/thread.html?threadId=d7373785-e36a-4d26-ac47-ed499fc18ba1


----------------------------------------------------------------
For list details, see http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <user-list-unsubscr...@magnolia-cms.com>
----------------------------------------------------------------

Reply via email to