page.apply(widget);
}
@Override
public Renderable compile(Class<?> templateClass) {
final Template template = loader.load(templateClass);
Renderable widget;
//is this an HTML, XML, or a flat-file template?
switch(template.getKind()) {
default:
case HTML:
widget = compileHtml(templateClass, template.getText());
break;
case XML:
widget = compileXml(templateClass, template.getText());
break;
case FLAT:
widget = compileFlat(templateClass, template.getText());
break;
case MVEL:
widget = compileMvel(templateClass, template.getText());
break;
case FREEMARKER:
widget = compileFreemarker(templateClass, template.getText());
break;
}
return widget;
}