|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.google.gwt.core.client.JavaScriptObject
com.extjs.gxt.ui.client.core.XTemplate
public final class XTemplate
A template class that supports advanced functionality like autofilling arrays, conditional processing with basic comparison operators, sub-templates, basic math function support, special built-in template variables, inline code execution and more.
| Constructor Summary | |
|---|---|
protected |
XTemplate()
|
| Method Summary | |
|---|---|
com.google.gwt.user.client.Element |
append(com.google.gwt.user.client.Element elem,
com.google.gwt.core.client.JavaScriptObject values)
|
java.lang.String |
applyTemplate(com.google.gwt.core.client.JavaScriptObject values)
Returns an HTML fragment of this template with the specified values applied. |
void |
compile()
Compiles the template into an internal function, eliminating the regex overhead. |
static XTemplate |
create(java.lang.String html)
Returns a new template instance using the given html. |
int |
getMaxDepth()
Returns the maximum number of nested children to process when preparing the template's data. |
void |
insertAfter(com.google.gwt.user.client.Element elem,
com.google.gwt.core.client.JavaScriptObject values)
Applies the supplied values to the template and inserts the new node(s) after elem. |
void |
insertBefore(com.google.gwt.user.client.Element elem,
com.google.gwt.core.client.JavaScriptObject values)
Applies the supplied values to the template and inserts the new node(s) before elem. |
void |
overwrite(com.google.gwt.user.client.Element elem,
com.google.gwt.core.client.JavaScriptObject values)
Applies the supplied values to the template and overwrites the content of elem with the new node(s). |
void |
setMaxDepth(int maxDepth)
Specifies the maxiumum number of nested models to search when preparing the templates data (defaults to 4). |
| Methods inherited from class com.google.gwt.core.client.JavaScriptObject |
|---|
cast, createArray, createFunction, createObject, equals, hashCode, toSource, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected XTemplate()
| Method Detail |
|---|
public final void setMaxDepth(int maxDepth)
maxDepth - the maximum number of nested childenpublic final int getMaxDepth()
public static XTemplate create(java.lang.String html)
html - the template
public final com.google.gwt.user.client.Element append(com.google.gwt.user.client.Element elem,
com.google.gwt.core.client.JavaScriptObject values)
public final java.lang.String applyTemplate(com.google.gwt.core.client.JavaScriptObject values)
values - the substitution values
public final void compile()
public final void insertAfter(com.google.gwt.user.client.Element elem,
com.google.gwt.core.client.JavaScriptObject values)
elem - the context elementvalues - the substitution values
public final void insertBefore(com.google.gwt.user.client.Element elem,
com.google.gwt.core.client.JavaScriptObject values)
elem - the context elementvalues - the substitution values
public final void overwrite(com.google.gwt.user.client.Element elem,
com.google.gwt.core.client.JavaScriptObject values)
elem - the context elementvalues - the substitution values
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||