I think I've got it working, thanks to the overlooked @InjectService. My
module constructor now looks like:
public AppModule(@InjectService("messageDAO") MessageDAO messageDOA) {
System.out.println("messageDOA2: " + messageDOA);
}
messageDAO is a Spring bean used in 'contributeBindingSource'.
The concept of services, build... methods and contribute... methods is an
area I need to dive into, it is still fuzzy.
Marcel
On Jan 26, 2008 7:41 PM, Fernando Padilla <[EMAIL PROTECTED]> wrote:
> Ah. I think there was a misunderstanding on how AppModule/Tapestry IoC
> works (maybe). And we also got confused.
>
> Within AppModule/TapestryIoC, the correct annotation is
> @InjectService("name").
>
>
> But you can review the documentation to make sure that we're all on the
> same page:
> http://tapestry.apache.org/tapestry5/tapestry-ioc/service.html
>
>
> And another reminder:
>
> Tapestry IoC does not enhance the classes, so the private variable
> enhancement does not work like it works in base/pages/components.
>
> So this will not work!
>
> public class Service {
> @Inject
> @Service("name")
> private Service2 service2;
> }
>
>
>
>
> Marcel Schepers wrote:
> > On Jan 26, 2008 6:34 PM, Fernando Padilla <[EMAIL PROTECTED]> wrote:
> >
> >> Within the AppModule you can try accessing the following services:
> >>
> >> 1) WebContextApplicationContext
> >> 2) RequestGlobals
> >> 3) @Inject @Service("beanName")
> >>
> >>
> > The third option does not work; Tapestry does only inject spring service
> in
> > classes residing in 'pages' or 'components' packages. AppModule is in
> > 'services'.
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>