Re: overriding a service implementation...

2012-06-08 Thread Howard Lewis Ship
public class MyModule { public static TroubleMaker decorateTroubleMaker(TroubleMaker defaultImpl) { return new MyTroubleMakerImpl(...); } } The convention is that decorateFoo decorates service id "Foo". There's other options, based on annotations, to decorate a wider swath of services (th

Re: overriding a service implementation...

2012-06-07 Thread Ray Nicholus
I've never used decorators in Tapestry before. I took a peek at the documentation, and I'm afraid I'm not really sure what I'm supposed to do here, specifically. I'm not even sure what code I should add to my local app module at this point. On Thu, Jun 7, 2012 at 8:19 PM, Howard Lewis Ship wrot

Re: overriding a service implementation...

2012-06-07 Thread Howard Lewis Ship
You have to get sneaky and decorate the TheModule.Symbols.SOME_SYMBOL service implementation with a new implementation (discarding the original). Not ideal and I've been thinking about how to address this more cleanly in Tapestry IoC. It would be nice if there was an explicit overrideXXX() module

overriding a service implementation...

2012-06-07 Thread Ray Nicholus
I'm pulling in a library that also uses T5, and in it's "module" class, it contains the following method: @ServiceId (Symbols.SOME_SYMBOL) public static Something buildThisThing(SomeObj someObj) { .. } In the library, this service is injected into the constructor of ano