Have to jump in here; sorry Tomasz, wrong on all counts :-) But thanks for trying to help out.
Filip is right, for services you don't use @Inject on fields; you gain access to dependencies via your constructor. Tapestry doesn't manipulate your service classes the way it does components, and @Inject on fields is based on lots of bytecode manipulation. Also, it doesn't matter at all whether a service is defined in a module via the bind() method, via a static builder method, or via an instance builder method. In fact, if I was doing the code again, module classes would not have instance methods, only static methods. On Mon, Apr 14, 2008 at 4:39 AM, Tomasz Dziurko <[EMAIL PROTECTED]> wrote: > As fas as I know T5 method build() in AppModule is static, so you need > make RequestGlobals static variable: > > @Inject > private static RequestGlobals requestGlobals; > > to pass it to constructor of mentioned service. When you try to get > something (eg HTTPServletRequesst ) from it after calling service you > will get NullPointerException, so I think it's not the right way. > > Regards > -- > Tomasz Dziurko > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Howard M. Lewis Ship Creator Apache Tapestry and Apache HiveMind --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]