> Digging through the code I notice there is a PageTemplateLocator > interface which seems like the appropriate service to override. What I > have tried is to add the following method to my AppModule class.... > > > public static void bind(ServiceBinder binder) { > ServiceBindingOptions options = > binder.bind( > PageTemplateLocator.class, > MyPageTemplateLocatorImpl.class > ); > } > > > ...but I get the following exception at startup..... > > > java.lang.RuntimeException: Service id 'PageTemplateLocator' has already > been defined by
Did you solve this issue? I get the same exception with another Service that's defined in TapestryModule that I want to override in my AppModule with my custom implementation... Thx && cheers, Martin On Wed, 2007-05-30 at 19:17 -0700, David Kendall wrote: > > From: Howard Lewis Ship [mailto:[EMAIL PROTECTED] > > Sent: Wednesday, May 30, 2007 5:15 PM > > There are internal services that can be overridden to handle those > > kinds of situations. > > The goal is to create something that works amazingly well for all > > the more typical cases, then start going after these others. Often > > it will involve moving a private interface out into the public space > .. > > > > > Thanks Howard - I appreciate your prompt response. However - I am not > clear if you are saying it cannot be done currently - or if you mean > that it can be done - but that I would be treading on somewhat unstable > ground given that the internal interfaces are subject to change. > > Digging through the code I notice there is a PageTemplateLocator > interface which seems like the appropriate service to override. What I > have tried is to add the following method to my AppModule class.... > > > public static void bind(ServiceBinder binder) { > ServiceBindingOptions options = > binder.bind( > PageTemplateLocator.class, > MyPageTemplateLocatorImpl.class > ); > } > > > ...but I get the following exception at startup..... > > > java.lang.RuntimeException: Service id 'PageTemplateLocator' has already > been defined by > org.apache.tapestry.internal.services.InternalModule.build(AssetFactory, > ComponentClassResolver) (at InternalModule.java:231) and may not be > redefined by > org.example.myapp.services.AppModule$MyPageTemplateLocatorImpl() (at > AppModule.java:159). You should rename one of the service builder > methods. > > > > > Am I wasting my time trying this? I can tolerate a certain amount of > instability when pulling in subsequent revisions of Tap5 - however - I > would like to get a proof of concept up and running if at all possible. > > Any thoughts on this? > > Thanks again. > > David Kendall > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > -- Martin Grotzke http://www.javakaffee.de/blog/
signature.asc
Description: This is a digitally signed message part