// the first superclass with a @Show and no @Extension is the template
while (!templateClass.isAnnotationPresent(Show.class) ||
templateClass.isAnnotationPresent(Decorated.class)) {
templateClass = templateClass.getSuperclass();
if (templateClass == Object.class) {
throw new MissingTemplateException("Could not find tempate for " + page.pageClass() +
". You must use @Show on a superclass of an @Extension page");
}
}
}