use of org.apache.tapestry5.internal.services.templates.DefaultTemplateLocator in project tapestry-5 by apache.
the class TapestryModule method contributeComponentTemplateLocator.
/**
* Contributes two template locators:
* <dl>
* <dt>Default</dt>
* <dd>Searches for the template on the classpath ({@link DefaultTemplateLocator}</dd>
* <dt>Page</dt>
* <dd>Searches for <em>page</em> templates in the context ({@link PageTemplateLocator})</dd>
* </dl>
*
* @since 5.2.0
*/
public static void contributeComponentTemplateLocator(OrderedConfiguration<ComponentTemplateLocator> configuration, @ContextProvider AssetFactory contextAssetFactory, @Symbol(SymbolConstants.APPLICATION_FOLDER) String applicationFolder, ComponentClassResolver componentClassResolver) {
configuration.add("Default", new DefaultTemplateLocator());
configuration.add("Page", new PageTemplateLocator(contextAssetFactory.getRootResource(), componentClassResolver, applicationFolder));
}
Aggregations