java.lang.Object
io.avaje.jex.core.TemplateManager
Render templates typically as html.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidregister(String extn, TemplateRender renderer) Register an extension and renderer.voidregister(Map<String, TemplateRender> source) Register all the extension renderer pairs.voidregisterDefault(TemplateRender render) Auto register via ServiceLoader if it has not already been explicitly registered.voidRender the template and model typically as html to the context.
-
Constructor Details
-
TemplateManager
public TemplateManager()
-
-
Method Details
-
register
Register all the extension renderer pairs. -
registerDefault
Auto register via ServiceLoader if it has not already been explicitly registered. -
register
Register an extension and renderer. -
render
Render the template and model typically as html to the context.- Parameters:
ctx- The context to render the template toname- The name of the templatemodel- The model key value pairs to render use with the template
-