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
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
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
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
You might consider using a MapBinder instead of @Named, and then
@Inject Map>.
Leigh.
On Oct 21, 9: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
>
> Patrick
>
> On Oct 21, 7:58 am, Bob Lee