|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Provides a templating service interface.
VelocityTemplateService.
However you can instruct Click to use a different implementation by adding
the following element to your click.xml configuration file.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<click-app charset="UTF-8">
<pages package="net.sf.click.examples.page"/>
<template-service classname="net.sf.click.extras.service.FreemarkerTemplateService">
</click-app>
| Method Summary | |
void |
onDestroy()
Destroy the TemplateService. |
void |
onInit(ServletContext servletContext)
Initialize the TemplateService with the given application configuration service instance. |
void |
renderTemplate(Page page,
Map model,
Writer writer)
Render the given page to the writer. |
void |
renderTemplate(String templatePath,
Map model,
Writer writer)
Render the given template and model to the writer. |
| Method Detail |
public void onInit(ServletContext servletContext)
throws Exception
ConfigService by invoking
ClickUtils.getConfigService(javax.servlet.ServletContext)
servletContext - the application servlet context
Exception - if an error occurs initializing the Template Servicepublic void onDestroy()
public void renderTemplate(Page page,
Map model,
Writer writer)
throws Exception
page - the page template to rendermodel - the model to merge with the template and renderwriter - the writer to send the merged template and model data to
Exception - if an error occurs
public void renderTemplate(String templatePath,
Map model,
Writer writer)
throws Exception
templatePath - the path of the template to rendermodel - the model to merge with the template and renderwriter - the writer to send the merged template and model data to
Exception - if an error occurs
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||