Re: tapestry injecting spring services

2014-07-17 Thread Thiago H de Paula Figueiredo
On Thu, 17 Jul 2014 12:31:45 -0300, squallmat .   
wrote:


public class ApplicatifDtoEncoder implements ValueEncoder  
{


@Inject
IServiceApplicatif serviceApplicatif;
...

My serviceApplicatif stays null. Is it possible to make @Inject works  
here ? outside of tapestry pages ?


Injection only happens in Tapestry-controlled classes (pages, components  
and mixins) or Tapestry-IoC instantiated objects (services or objects  
created with ObjectLocator.autobuild()). In other words, no injection  
happens if you get your object by instantiating it yourself (using the  
'new' keyword).


--
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br

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



tapestry injecting spring services

2014-07-17 Thread squallmat .
I used at many times injections of spring services bean in my tapestry
pages and that works really well.
But now I need to use them in Encoders class, when I do that :

public class ApplicatifDtoEncoder implements ValueEncoder {

@Inject
IServiceApplicatif serviceApplicatif;
...


My serviceApplicatif stays null. Is it possible to make @Inject works here
? outside of tapestry pages ?