public abstract class TemplatePage extends java.lang.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 |
---|---|
java.sql.Connection |
con |
java.util.Map |
context |
static java.lang.String |
DEFAULT_ENCODING |
Log |
log |
java.io.Writer |
out |
static java.lang.String |
PACKAGE_NAME |
java.io.File |
templateFile |
Constructor and Description |
---|
TemplatePage() |
Modifier and Type | Method and Description |
---|---|
void |
bug(java.io.Writer writer,
java.lang.Object str1)
Prints a debug statement if debugging is turned on for this page.
|
void |
bug(java.io.Writer writer,
java.lang.Object str1,
java.lang.Object... args) |
void |
dbg(boolean val) |
java.lang.String |
getSourcePath() |
void |
render(java.io.File out) |
void |
render(java.io.OutputStream out) |
abstract void |
render(java.io.PrintWriter out) |
void |
render(java.io.Writer out) |
void |
setConnection(java.sql.Connection con) |
void |
setContext(java.util.Map m) |
void |
setSourcePath(java.io.File templateFile) |
public static java.lang.String PACKAGE_NAME
public static java.lang.String DEFAULT_ENCODING
public java.io.Writer out
public java.io.File templateFile
public java.sql.Connection con
public java.util.Map context
public TemplatePage()
public void setSourcePath(java.io.File templateFile)
public java.lang.String getSourcePath()
public void setConnection(java.sql.Connection con)
public void setContext(java.util.Map m)
public void render(java.io.Writer out) throws java.lang.Exception
java.lang.Exception
public void render(java.io.File out) throws java.lang.Exception
java.lang.Exception
public void render(java.io.OutputStream out) throws java.lang.Exception
java.lang.Exception
public abstract void render(java.io.PrintWriter out) throws java.lang.Exception
java.lang.Exception
public final void dbg(boolean val)
public final void bug(java.io.Writer writer, java.lang.Object str1) throws java.io.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.
java.io.IOException
public final void bug(java.io.Writer writer, java.lang.Object str1, java.lang.Object... args) throws java.io.IOException
java.io.IOException