protected AWResource parentTemplateResource ()
{
// Recurse up the superclass chain to locate a template. We used to require subclasses
// to explicitly provide the templateName of the superclass, but now we iteratively
// locate the template resource as follows:
AWResource resource = null;
AWResourceManager resourceManager = templateResourceManager();
Class superclass = getClass().getSuperclass();
while (resource == null && AWComponent.ClassObject.isAssignableFrom(superclass)) {
String superclassName = superclass.getName();
AWComponentDefinition componentDefinition = application().componentDefinitionForName(superclassName);