You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Michael Courcy <mi...@gmail.com> on 2007/11/04 15:48:45 UTC
typo in the documentation
Hi
I think there's a small typo in the documentation in
http://tapestry.apache.org/tapestry5/tapestry-ioc/service.html
In the section : Injecting dependencies
==============================================
For example, let's say the Indexer needs a JobScheduler to control when
it executes, and a FileSystem to access files and store indexes.
public static Indexer build(JobScheduler scheduler, FileSystem fileSystem)
{
IndexerImpl indexer = new IndexerImpl(fileSystem);
scheduler.scheduleDailyJob(indexer);
return indexer;
}
Here we've annotated the parameters of the service builder method to
identify what service to inject for that parameter.
================================================
But there's no anotation at all so I think the author meant
==============================================
For example, let's say the Indexer needs a JobScheduler to control when
it executes, and a FileSystem to access files and store indexes.
public static Indexer build(@InjectService JobScheduler scheduler, @InjectService FileSystem fileSystem)
{
IndexerImpl indexer = new IndexerImpl(fileSystem);
scheduler.scheduleDailyJob(indexer);
return indexer;
}
Here we've annotated the parameters of the service builder method to
identify what service to inject for that parameter.
================================================
Michael.
/ /