You can create modules and use the IoC annotations to build services.
However, the "magic" injection into private fields is part of Tapestry's very aggressive bytecode enhancement of component classes. It's not available for ordinary classes (I'd tend to call them data- or model-classes) outside of the controlled Tapestry packages (.pages, .components and .base). Basically, once Tapestry gets done working over a component class, it isn't good outside of Tapestry, it isn't even instantiable. For services, you place an org.apache.tapestry.ioc.annotations.Injectannotation on a parameter of your service implementation constructor. Or more likey, don't bother to annotate and Tapestry IoC will select the correct service or object to inject automatically. On 5/20/07, Donyee <[EMAIL PROTECTED]> wrote:
I try to use the Tapestry-ioc in the other packages,not just in the .pages.* package. Does it support this? I try to use @Inject in my domain.service.Impl.AccountServiceImpl.java code: @Inject private AccountDao dao; but it doesn't work! Any suggestion? ----徐 依伟
-- Howard M. Lewis Ship TWD Consulting, Inc. Independent J2EE / Open-Source Java Consultant Creator and PMC Chair, Apache Tapestry Creator, Apache HiveMind Professional Tapestry training, mentoring, support and project work. http://howardlewisship.com