Just re-looked at your code - can't believe I missed this the first
time round...

I believe the @Inject is working just fine - you just have to access
the service *after* the class has been constructed!

T5 is good, but it can't re-write the JVM!

General sequence of events:

 - T5 instantiates the DocumentGenerator
 - JVM executes the no-args constructor
 - T5 injects your services

Only then can you access the services - well, unless you use
constructor injection.

Steve.
--
Steve Eynon
-------------------------------
"If at first you don't succeed,
   so much for skydiving!"





On 21 September 2011 21:11, Thiago H. de Paula Figueiredo
<thiag...@gmail.com> wrote:
> On Wed, 21 Sep 2011 09:35:36 -0300, Chris Poulsen <mailingl...@nesluop.dk>
> wrote:
>
>> Hi,
>
> Hi!
>
>> Thanks for the clarification! I was too lazy to read through the IoC docs
>> as its not a code problem of mine we're discussing here. :)
>
> :)
>
>> I think i read that tap IoC worked by constructor injection only;
>> somewhere at some point - its nice to know that it is not the case when i
>> have to use it at some point :P
>
> Yep, Tapestry-IoC supported only constructor injection (which is my
> preferred way) only for some time.
>
> --
> Thiago H. de Paula Figueiredo
> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and
> instructor
> Owner, Ars Machina Tecnologia da Informação Ltda.
> http://www.arsmachina.com.br
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to