public class OATemplate<F extends OAObject> extends Object
Used for producing html, reports, web pages, emails, UI components like tooltips, autocomplete, renderers, and more.
Modifier and Type | Field and Description |
---|---|
protected String |
fromText |
protected String |
hiliteText |
protected String |
toText |
Constructor and Description |
---|
OATemplate() |
OATemplate(String htmlTemplate) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
_generate(com.viaoa.template.OATemplate.TreeNode node,
OAObject obj,
Hub hub,
StringBuilder sb,
OAProperties props,
int cntStop) |
protected void |
_removeRowTags(com.viaoa.template.OATemplate.TreeNode treeNode,
int childPos) |
protected void |
_removeRowTagsAfter(com.viaoa.template.OATemplate.TreeNode treeNode) |
protected void |
_removeRowTagsBefore(com.viaoa.template.OATemplate.TreeNode treeNode) |
protected OAObjectGrid |
createObjectGrid(com.viaoa.template.OATemplate.TreeNode node,
Hub hub) |
protected com.viaoa.template.OATemplate.TreeNode |
createTree(String doc) |
protected boolean |
generate(com.viaoa.template.OATemplate.TreeNode node,
OAObject obj,
Hub hub,
StringBuilder sb,
OAProperties props,
int cntStop)
Returns false if it did not complete (stopProcessing was called)
|
boolean |
getHasParseError() |
protected String |
getIncludeText(String name)
This is called to get the text for any include tags.
|
protected String |
getOutputText(String s)
Called to be able to convert before adding to output string.
|
protected Object |
getProperty(OAObject oaObj,
String propertyName)
Method that is called to get an object property value.
|
String |
getTemplate() |
protected String |
getValue(OAObject obj,
String propertyName,
int width,
String fmt,
OAProperties props,
boolean bUseFormat) |
protected void |
parse(com.viaoa.template.OATemplate.TreeNode root) |
protected ArrayList<com.viaoa.template.OATemplate.Token> |
parseTokens(String doc) |
protected String |
preprocess(String doc) |
protected String |
preprocess(String doc,
ArrayList<String> alInclude) |
String |
process() |
String |
process(F objRoot) |
String |
process(F objRoot1,
F objRoot2) |
String |
process(F objRoot1,
F objRoot2,
Hub<F> hubRoot,
OAProperties props) |
String |
process(F objRoot1,
F objRoot2,
OAProperties props) |
String |
process(F objRoot1,
Hub<F> hubRoot,
OAProperties props) |
String |
process(F objRoot,
OAProperties props) |
String |
process(Hub<F> hub) |
String |
process(Hub<F> hub,
OAProperties props) |
protected void |
removeRowTags(com.viaoa.template.OATemplate.TreeNode treeNode) |
void |
setHiliteOutputText(String text)
Used by getOutPutText to call OAString.hilite(text)
|
void |
setOutputTextConversion(String fromText,
String toText)
Used by getOutPutText to call OAString.convert(value, from, to)
|
void |
setProperty(String name,
Object value)
Set a property, that is then referenced using <%=$name%> in the html.
|
void |
setTemplate(String temp) |
void |
stopProcessing()
Used to have a a call to getHtml stopped.
|
protected String fromText
protected String toText
protected String hiliteText
public OATemplate()
public OATemplate(String htmlTemplate)
public void setTemplate(String temp)
public String getTemplate()
public String process()
public String process(F objRoot1, F objRoot2, OAProperties props)
public String process(F objRoot, OAProperties props)
public String process(Hub<F> hub, OAProperties props)
public void stopProcessing()
public String process(F objRoot1, Hub<F> hubRoot, OAProperties props)
public void setProperty(String name, Object value)
name
- name used in html tag, without the '$' prefix. Note: it will remove '$' prefix if it is included.protected com.viaoa.template.OATemplate.TreeNode createTree(String doc)
protected void removeRowTags(com.viaoa.template.OATemplate.TreeNode treeNode)
protected void _removeRowTags(com.viaoa.template.OATemplate.TreeNode treeNode, int childPos)
protected void _removeRowTagsBefore(com.viaoa.template.OATemplate.TreeNode treeNode)
protected void _removeRowTagsAfter(com.viaoa.template.OATemplate.TreeNode treeNode)
protected String getIncludeText(String name)
protected void parse(com.viaoa.template.OATemplate.TreeNode root)
public boolean getHasParseError()
protected boolean generate(com.viaoa.template.OATemplate.TreeNode node, OAObject obj, Hub hub, StringBuilder sb, OAProperties props, int cntStop)
protected boolean _generate(com.viaoa.template.OATemplate.TreeNode node, OAObject obj, Hub hub, StringBuilder sb, OAProperties props, int cntStop)
protected OAObjectGrid createObjectGrid(com.viaoa.template.OATemplate.TreeNode node, Hub hub)
protected String getOutputText(String s)
public void setOutputTextConversion(String fromText, String toText)
public void setHiliteOutputText(String text)
protected String getValue(OAObject obj, String propertyName, int width, String fmt, OAProperties props, boolean bUseFormat)
Copyright © 1999–2025 ViaOA. All rights reserved.