public abstract class TemplatePage extends Object
Pages are always assumed to be written in UTF-8 (a superset of regular ascii/IS0-8859-1). If the template page is sent as HTML to a device (via some outside mechanism that uses the templates as part of its workflow), then the HTML contained in the page template should set the appropriate content type/encoding meta header to say UTF-8, if UTF-8 characters (such as emojis) are used in the page.
See TemplateMgr
Modifier and Type | Field and Description |
---|---|
Connection |
con |
Map |
context |
static String |
DEFAULT_ENCODING |
Log |
log |
Writer |
out |
static String |
PACKAGE_NAME |
File |
templateFile |
Constructor and Description |
---|
TemplatePage() |
Modifier and Type | Method and Description |
---|---|
void |
bug(Writer writer,
Object str1)
Prints a debug statement if debugging is turned on for this page.
|
void |
bug(Writer writer,
Object str1,
Object... args) |
void |
dbg(boolean val) |
String |
getSourcePath() |
void |
render(File out) |
void |
render(OutputStream out) |
abstract void |
render(PrintWriter out) |
void |
render(Writer out) |
void |
setConnection(Connection con) |
void |
setContext(Map m) |
void |
setSourcePath(File templateFile) |
public static String PACKAGE_NAME
public static String DEFAULT_ENCODING
public File templateFile
public Connection con
public TemplatePage()
public void setSourcePath(File templateFile)
public String getSourcePath()
public void setConnection(Connection con)
public void setContext(Map m)
public void render(OutputStream out) throws Exception
Exception
public abstract void render(PrintWriter out) throws Exception
Exception
public final void dbg(boolean val)
public final void bug(Writer writer, Object str1) throws IOException
Typically the implicit page printwriter (the out
variable) will be passed to this method and debug statements will be
printed at the point where they are lexically invoked at the page.
IOException
public final void bug(Writer writer, Object str1, Object... args) throws IOException
IOException