Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.tapestry5.internal.services
Interface ComponentTemplateSource

All Known Implementing Classes:
  ComponentTemplateSourceImpl

    public interface ComponentTemplateSource

Provides access to cached `ComponentTemplate`s. The source acts as a invalidation event hub, and will broadcast invalidation events when any loaded template resource changes. The listener for these invalidation events is the page source, which stores cached page instances.

Any search for a template will end with success (a non-null template), but the template returned may be the `missing template`.

Method Summary
`InvalidationEventHub` | `getInvalidationEventHub()` Event hub used to notify listeners that underlying component template files have changed.
`ComponentTemplate` | `getTemplate(ComponentModel componentModel, ComponentResourceSelector selector)` Provides access to a template.

Method Detail

### getTemplate

    ComponentTemplate getTemplate(ComponentModel componentModel,
                                  ComponentResourceSelector selector)

  Provides access to a template. The template will be parsed as necessary. If no template for the exact component is found, then the template for the component's parent is returned. In this way, it is possible for a component to extend the behavior of its super-class without duplicating the super-class component's template.

  In some cases, the empty template will be returned.

  Parameters:
    `componentModel` - model for the component whose template is to be accessed
    `selector` - defines locale and other information needed to locate template
  Returns:
    the cached template instance

### getInvalidationEventHub

    InvalidationEventHub getInvalidationEventHub()

  Event hub used to notify listeners that underlying component template files have changed.

  Since:
    5.1.0.0
  See Also:
    `ComponentTemplates`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2012 The Apache Software Foundation.