Roo.Template
Roo.XTemplate 

		   

Class Roo.XTemplate

Package:Roo
Defined In: Roo/XTemplate.js.
Class:XTemplate
Extends: Roo.Template
Provides a template that can have nested templates for loops or conditionals. The syntax is:

var t = new Roo.XTemplate(
'<select name="{name}">',
'<tpl for="options"><option value="{value:trim}">{text:ellipsis(10)}</option></tpl>',
'</select>'
);

// then append, applying the master template values


Supported features:

Tags:


{a_variable} - output encoded.
{a_variable.format:("Y-m-d")} - call a method on the variable
{a_variable:raw} - unencoded output
{a_variable:toFixed(1,2)} - Roo.util.Format."toFixed"
{a_variable:this.method_on_template(...)} - call a method on the template object.


The tpl tag:

<tpl for="a_variable or condition.."></tpl>
<tpl if="a_variable or condition"></tpl>
<tpl exec="some javascript"></tpl>
<tpl name="named_template"></tpl> (experimental)

<tpl for="."></tpl> - just iterate the property..
<tpl for=".."></tpl> - iterates with the parent (probably the template)
Class Comments / Notes => [Add Your comment/notes about this class]
Config Options (Usually are also Properties)
Options Defined By
Public Properties - Has None
Public Methods
Method Defined By
 
new Roo.XTemplate ()
Create a new Roo.XTemplate
Create a new Roo.XTemplate
 
Events - Has None
Documentation generated by Introspection Doc Generator on Fri Jul 13 2018 14:10:53 GMT+0800 (HKT) Based on JsDoc Toolkit