Guice Servlet issues we should try and fix

2009-10-21 Thread Dhanji R. Prasanna
As described here: http://java-points.blogspot.com/2009/10/struts-1-and-guice.html --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "google-guice" group. To post to this group, send email to google-guice@googlegroups.c

Re: Bind Assisted injected class to interface

2009-10-21 Thread eric
Hi Dhanji, It seems the bind().toConstructor() is not documented, could you please tell me more about it? On Oct 21, 11:05 am, "Dhanji R. Prasanna" wrote: > On Wed, Oct 21, 2009 at 1:27 PM, eric wrote: > > > Thanks for your reply, Jean-Francois, > > > But really, I need to bind SimpleCommand t

Re: Bind Assisted injected class to interface

2009-10-21 Thread Dhanji R. Prasanna
On Wed, Oct 21, 2009 at 8:46 PM, eric wrote: > > Hi Dhanji, > > It seems the bind().toConstructor() is not documented, could you > please tell me more about it? > It allows you to bind to any constructor (not just those annotated with @Inject). It takes an argument of type Constructor, from the

Provider with parameterization?

2009-10-21 Thread Patrick Lightbody
I'm trying to integrate Velocity in to my Guice environment and thought it would be nice if I could abstract it to the point that my code could simply ask for a Template object and get back a template that represents a specific file (ie: foo.vm). My first attempt was very simple. I @Inject Templa

Re: Provider with parameterization?

2009-10-21 Thread Bob Lee
On Wed, Oct 21, 2009 at 9:31 AM, Patrick Lightbody wrote: > But then I was thinking, it'd be cool if I could somehow @Inject this: > > @Named("foo.vm") Provider templateProvider > ... > Template template = templateProvider.get(); > > Then my provider would somehow be able to detect that it should

Re: Bind Assisted injected class to interface

2009-10-21 Thread je...@swank.ca
On Oct 21, 2:46 am, eric wrote: > It seems the bind().toConstructor() is not documented, could you > please tell me more about it? See also, the toConstructor documentation: http://code.google.com/p/google-guice/wiki/ToConstructorBindings --~--~-~--~~~---~--~---

Re: Provider with parameterization?

2009-10-21 Thread Patrick Lightbody
Bob, Cool - that's what I was thinking was the "right" way to do it, but was just curious if there was another way Patrick On Oct 21, 7:58 am, Bob Lee wrote: > On Wed, Oct 21, 2009 at 9:31 AM, Patrick Lightbody > wrote: > > > But then I was thinking, it'd be cool if I could somehow @Inject thi

Re: Bind Assisted injected class to interface

2009-10-21 Thread Alen Vrečko
What you are doing might be similar to this http://groups.google.com/group/google-guice/browse_thread/thread/efcdcd851c06ca1d. Maybe this code will give you some ideas http://pastie.org/453944. Cheers Alen --~--~-~--~~~---~--~~ You received this message because you

Re: Provider with parameterization?

2009-10-21 Thread Dhanji R. Prasanna
On Thu, Oct 22, 2009 at 3:16 AM, Patrick Lightbody wrote: > > Bob, > Cool - that's what I was thinking was the "right" way to do it, but > was just curious if there was another way > The wrong way? jk Dhanji. ;) --~--~-~--~~~---~--~~ You received this message be

Re: Bind Assisted injected class to interface

2009-10-21 Thread eric
Very helpful, thank you guys. On Oct 22, 3:27 am, Alen Vrečko wrote: > What you are doing might be similar to > thishttp://groups.google.com/group/google-guice/browse_thread/thread/efcd > Maybe this code will give you some ideashttp://pastie.org/453944. > > Cheers > Alen --~--~-~--~