if your designers are only designing "pages" and not "components" that
will end up in your app's context root (not packaged away in a jar)
then you could probably get away with just contributing a
PageTemplateLocator in your AppModule.
Hi Michael,
Thanks for your reply. The designers do indeed only design pages, so it
seems like your solution is the way to go about it.
I haven't been able to get this to work though. Maybe you can point out
what I'm doing wrong here?
In my AppModule I have this code:
public static void bind(ServiceBinder binder) {
binder.bind(PageTemplateLocator.class,
HTMLTemplateLocator.class).withId("htmlLocator");
}
public static void contributeAliasOverrides(
@InjectService("htmlLocator") PageTemplateLocator locator,
Configuration<AliasContribution> configuration) {
configuration.add(AliasContribution.create(PageTemplateLocator.class,
locator));
}
My HTMLTemplateLocator is currently just an exact copy from the Tapestry
PageTemplateLocatorImpl.
This gives me the following error when I try to access the webapp:
Exception constructing service 'htmlLocator':
Error invoking constructor [MYPACKAGE].HTMLTemplateLocator(Resource,
ComponentClassResolver) (at HTMLTemplateLocator.java:31) (for service
'htmlLocator'): No service implements the interface
org.apache.tapestry.ioc.Resource.
It seems there's a problem setting up the contextRoot Resource required
for calling the constructor of my 'custom' TemplateLocator, but it works
for the default PageTemplateLocatorImpl?
Regards,
Onno
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]