Also, it seems the fourth example in this section<http://tapestry.apache.org/defining-tapestry-ioc-services.html#DefiningTapestryIOCServices-InjectingResources> doesn't work with Tapestry-IoC-5.3.6 (service builder method in the module accepting 'String serviceId' parameter).
Has this behavior changed in recent updates and the documentation is behind? On Sat, Mar 16, 2013 at 11:15 PM, Eli Doran <e...@elidoran.com> wrote: > Using a String param in the service implementation constructor causes a > RuntimeException stating "No service implements the interface > java.lang.String". It is mentioned in multiple places in the documentation > that a String type without the Inject or InjectService annotations will > receive the ServiceId as a "Resource", but, I'm causing this exception > instead. > > For an example below is a ServiceBinder call and the service > implementation constructor prototype. > > serviceBinder.bind(ServiceIdAware.class, >> ServiceIdAwareImpl.class).withId("TestId"); >> > serviceBinder.bind(ServiceIdAware.class, >> ServiceIdAwareImpl.class).withId("TestId2"); >> > >> > public ServiceIdAwareImpl(String serviceId) > > > Shouldn't that constructor receive the ServiceId specified in the withId > method? > > > > On Fri, Mar 15, 2013 at 6:53 AM, Steve Eynon < > steve.ey...@alienfactory.co.uk> wrote: > >> No, but if your contribution is a service then you can inject the >> ServiceId using the @Symbol annotation: >> >> http://tapestry.apache.org/symbols.html#Symbols-InjectingValuesfromSymbols >> >> Steve. >> >> >> On 15 March 2013 11:26, Eli Doran <e...@elidoran.com> wrote: >> > When using OrderedConfiguration the add method's first argument is an >> ID. >> > Is it possible to inject that ID into the corresponding instance's >> > constructor? >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org >> For additional commands, e-mail: users-h...@tapestry.apache.org >> >> >