|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object ee.mare.indrek.jtlt.Template ee.mare.indrek.jtlt.HtmlTemplate
Html specialized templating class.
Constructor Summary | |
HtmlTemplate(HtmlTemplateGenerator gen)
Construct a new html template from given generator. |
Method Summary | |
static String |
encodeHTML(String str)
Translate special characters <, >, ", ' and & into HTML entities. |
static String |
encodeJs(String str)
Escape ', \, \n and \r with \ for use inside javascript strings. |
static String |
encodeURL(String str)
Encode-s URL arguments by replacing unrecognised characters with %XX. |
void |
instance_rows(String sub_name,
ResultSet rset)
Go through all of the rows in SQL ResultSet (using next()) and for every row lock given sub and replace() all columns inside template. |
void |
nreplace_raw(String key,
String value)
The same as nreplace but will not HTML escape the value. |
void |
nreplace(String key,
String value)
Replace given key in the template with value in this block and all subblocks and also in case of plain KEY also apply escapeSpecialChars on it. |
void |
replace_raw(String key,
String value)
The same as replace but will not HTML escape the value. |
void |
replace(ResultSet rset)
Replace a single row from the SQL ResultSet. |
void |
replace(String key,
String value)
Replace given key in the template with value in the currently active block and in case of plain KEY also apply escapeSpecialChars on it. |
Methods inherited from class ee.mare.indrek.jtlt.Template |
addParam, exists, getBase, instance, instance, lock_back, lock_front, lock, output, replace, toString, unlock |
Methods inherited from class Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public HtmlTemplate(HtmlTemplateGenerator gen)
Method Detail |
public static String encodeHTML(String str)
public static String encodeJs(String str)
public static String encodeURL(String str)
public void instance_rows(String sub_name, ResultSet rset)
public void nreplace_raw(String key, String value)
public void nreplace(String key, String value)
nreplace
in class Template
public void replace_raw(String key, String value)
public void replace(ResultSet rset)
public void replace(String key, String value)
replace
in class Template
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |