org.apache.tapestry.engine
Interface ITemplateSource
- All Known Implementing Classes:
- DefaultTemplateSource
- public interface ITemplateSource
A source of localized HTML templates for components.
The cache is the means of access for components to load thier templates,
which they need not do until just before rendering.
The template cache must be able to locate and parse templates as needed.
It may maintain templates in memory.
- Version:
- $Id: ITemplateSource.java,v 1.2 2003/06/21 21:25:22 mindbridge Exp $
- Author:
- Howard Ship
TEMPLATE_ASSET_NAME
public static final String TEMPLATE_ASSET_NAME
- Name of an
IAsset
of a component that provides the template
for the asset. This overrides the default (that the template is in
the same directory as the specification). This allows
pages or component templates to be located properly, relative to static
assets (such as images and stylesheets).
- Since:
- 2.2
TEMPLATE_TAG_PARAMETER_NAME
public static final String TEMPLATE_TAG_PARAMETER_NAME
- Since:
- 3.0
getTemplate
public ComponentTemplate getTemplate(IRequestCycle cycle,
IComponent component)
- Locates the template for the component.
- Parameters:
cycle
- The request cycle loading the template; this is required
in some cases when the template is loaded from an IAsset
.component
- The component for which a template should be loaded.- Throws:
ApplicationRuntimeException
- if the resource cannot be located or loaded.
reset
public void reset()
- Invoked to have the source clear any internal cache. This is most often
used when debugging an application.