|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.extjs.gxt.ui.client.core.Template
public class Template
Represents an HTML fragment template. Templates can be precompiled for greater performance.
| Constructor Summary | |
|---|---|
Template(java.lang.String html)
Creates a new template with the given html. |
|
| Method Summary | |
|---|---|
com.google.gwt.user.client.Element |
append(com.google.gwt.user.client.Element el,
java.lang.Object... values)
Applies the supplied values to the template and appends the new node(s) to el. |
com.google.gwt.user.client.Element |
append(com.google.gwt.user.client.Element el,
Params values)
Applies the supplied values to the template and appends the new node(s) to el. |
java.lang.String |
applyTemplate(com.google.gwt.core.client.JavaScriptObject values)
Returns an HTML fragment of this template with the specified values applied. |
java.lang.String |
applyTemplate(Params 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. |
com.google.gwt.user.client.Element |
create(java.lang.Object... values)
Creates a new element. |
com.google.gwt.user.client.Element |
create(Params values)
Creates a new element. |
java.lang.String |
getHtml()
|
ModelStringProvider<ModelData> |
getStringProvider()
Returns the template's string provider. |
com.google.gwt.user.client.Element |
insert(com.google.gwt.user.client.Element el,
int index,
Params values)
Applies the supplied values to the template and inserts the new node(s) at the given index. |
com.google.gwt.user.client.Element |
insertAfter(com.google.gwt.user.client.Element el,
Params params)
Applies the supplied values to the template and inserts the new node(s) after el. |
com.google.gwt.user.client.Element |
insertBefore(com.google.gwt.user.client.Element el,
Params values)
Applies the supplied values to the template and inserts the new node(s) before el. |
com.google.gwt.user.client.Element |
insertFirst(com.google.gwt.user.client.Element el,
Params values)
Applies the supplied values to the template and inserts the new node(s) as the first child of el. |
com.google.gwt.user.client.Element |
overwrite(com.google.gwt.user.client.Element el,
com.google.gwt.core.client.JavaScriptObject values)
Applies the supplied values to the template and overwrites the content of el with the new node(s). |
com.google.gwt.user.client.Element |
overwrite(com.google.gwt.user.client.Element el,
Params values)
Applies the supplied values to the template and overwrites the content of el with the new node(s). |
void |
set(java.lang.String html,
boolean compile)
Sets the HTML used as the template and optionally compiles it. |
void |
setStringProvider(ModelStringProvider<ModelData> stringProvider)
Sets the string provider for the template. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Template(java.lang.String html)
html - the HTML fragment or an array| Method Detail |
|---|
public com.google.gwt.user.client.Element append(com.google.gwt.user.client.Element el,
java.lang.Object... values)
el - the context elementvalues - the positional template values
public com.google.gwt.user.client.Element append(com.google.gwt.user.client.Element el,
Params values)
el - the context elementvalues - the template values
public java.lang.String applyTemplate(com.google.gwt.core.client.JavaScriptObject values)
values - the substitution values
public java.lang.String applyTemplate(Params values)
values - the values
public void compile()
public com.google.gwt.user.client.Element create(java.lang.Object... values)
values - the substitution values
public com.google.gwt.user.client.Element create(Params values)
values - the substitution values
public java.lang.String getHtml()
public ModelStringProvider<ModelData> getStringProvider()
public com.google.gwt.user.client.Element insert(com.google.gwt.user.client.Element el,
int index,
Params values)
el - the context elementindex - the insert indexvalues - the values
public com.google.gwt.user.client.Element insertAfter(com.google.gwt.user.client.Element el,
Params params)
el - the context elementparams - the values
public com.google.gwt.user.client.Element insertBefore(com.google.gwt.user.client.Element el,
Params values)
el - the context elementvalues - the values
public com.google.gwt.user.client.Element insertFirst(com.google.gwt.user.client.Element el,
Params values)
el - the context elementvalues - the values
public com.google.gwt.user.client.Element overwrite(com.google.gwt.user.client.Element el,
Params values)
el - the context elementvalues - the values
public com.google.gwt.user.client.Element overwrite(com.google.gwt.user.client.Element el,
com.google.gwt.core.client.JavaScriptObject values)
el - the context elementvalues - the values
public void set(java.lang.String html,
boolean compile)
html - the html fragmentcompile - true to compilepublic void setStringProvider(ModelStringProvider<ModelData> stringProvider)
stringProvider - the string provider
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||