return parser.parseTemplate(r);
}
private Resource locateTemplateResource(ComponentModel initialModel, Locale locale)
{
ComponentModel model = initialModel;
while (model != null)
{
Resource localized = locator.locateTemplate(model, locale);
if (localized != null)
return localized;
// Otherwise, this component doesn't have its own template ... lets work up to its
// base class and check there.
model = model.getParentModel();
}
// This will be a Resource whose URL is null, which will be picked up later and force the
// return of the empty template.