On Tue, 25 May 2010 07:07:05 -0300, Andreas Berg <si...@taz.de> wrote:

Hi

Hi!

I make use of tapestry 5 services in implementations of pages and components
by something like

        @Inject
        private XyService xyService;

@Inject fields will only be injected in classes instantiated by Tapestry (pages, componentes, mixins) or Tapestry-IoC (services).

The only way I see so far is to pass the service as parameters or by constructor to my
domains objects, which is not very nice.

I disagree. I think injection by constructor is very nice, as it allows you classes to work the same way with and without and IoC container.

--
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

Reply via email to