I've found that the problem seems to be that ComponentTemplateSourceImpl
fails to load MyTemplateLocator.class and insteads load
DefaultTemplateLocator/PageTemplateLocator which looks for tml pages in the
correct directory, where MyTemplateLocator looks for html pages.
How do I override this behavoir in 5.2.6, a behavoir that worked in 5.1.0.5.
locator.locateTemplate fails here.
private Resource locateTemplateResource(ComponentModel initialModel, Locale
locale)
{
ComponentModel model = initialModel;
while (model != null)
{
Resource localized = locator.locateTemplate(model, locale);
if (localized != null)
return localized;
// Otherwise, this component doesn't have its own template ...
lets work up to its
// base class and check there.
model = model.getParentModel();
}
// This will be a Resource whose URL is null, which will be picked
up later and force the
// return of the empty template.
return
initialModel.getBaseResource().withExtension(TapestryConstants.TEMPLATE_EXTENSION);
}
--
View this message in context:
http://tapestry.1045711.n5.nabble.com/Tapestry-5-1-0-5-to-5-2-6-migration-html-templates-tp5713624p5713695.html
Sent from the Tapestry - Dev mailing list archive at Nabble.com.
-
To unsubscribe, e-mail: dev-unsubscr...@tapestry.apache.org
For additional commands, e-mail: dev-h...@tapestry.apache.org