Upgrade to ExtJS 4.0.2 - Released 06/09/2011
[extjs.git] / docs / output / Ext.XTemplate.js
1 Ext.data.JsonP.Ext_XTemplate({
2   "allMixins": [
3
4   ],
5   "deprecated": null,
6   "docauthor": null,
7   "members": {
8     "cfg": [
9       {
10         "type": "RegExp",
11         "deprecated": null,
12         "alias": null,
13         "protected": false,
14         "tagname": "cfg",
15         "href": "XTemplate.html#Ext-XTemplate-cfg-codeRe",
16         "static": false,
17         "filename": "/mnt/ebs/nightly/git/SDK/platform/src/XTemplate.js",
18         "private": false,
19         "name": "codeRe",
20         "owner": "Ext.XTemplate",
21         "doc": "<p>The regular expression used to match code variables (default: matches <tt>{[expression]}</tt>).</p>\n",
22         "linenr": 359,
23         "html_filename": "XTemplate.html"
24       },
25       {
26         "type": "Boolean",
27         "deprecated": null,
28         "alias": null,
29         "protected": false,
30         "tagname": "cfg",
31         "href": "Template2.html#Ext-Template-cfg-disableFormats",
32         "shortDoc": "true to disable format functions in the template. ...",
33         "static": false,
34         "filename": "/mnt/ebs/nightly/git/SDK/platform/src/Template.js",
35         "private": false,
36         "name": "disableFormats",
37         "owner": "Ext.Template",
38         "doc": "<p>true to disable format functions in the template. If the template doesn't contain format functions, setting\ndisableFormats to true will reduce apply time (defaults to false)</p>\n",
39         "linenr": 111,
40         "html_filename": "Template2.html"
41       }
42     ],
43     "method": [
44       {
45         "deprecated": null,
46         "alias": null,
47         "protected": false,
48         "tagname": "method",
49         "href": "Base3.html#Ext-Base-method-addStatics",
50         "shortDoc": "Add / override static properties of this class. ...",
51         "static": true,
52         "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/class/Base.js",
53         "private": false,
54         "params": [
55           {
56             "type": "Object",
57             "optional": false,
58             "doc": "\n",
59             "name": "members"
60           }
61         ],
62         "name": "addStatics",
63         "owner": "Ext.Base",
64         "doc": "<p>Add / override static properties of this class.</p>\n\n<pre><code>Ext.define('My.cool.Class', {\n    ...\n});\n\nMy.cool.Class.addStatics({\n    someProperty: 'someValue',      // My.cool.Class.someProperty = 'someValue'\n    method1: function() { ... },    // My.cool.Class.method1 = function() { ... };\n    method2: function() { ... }     // My.cool.Class.method2 = function() { ... };\n});\n</code></pre>\n",
65         "linenr": 388,
66         "return": {
67           "type": "Ext.Base",
68           "doc": "<p>this</p>\n"
69         },
70         "html_filename": "Base3.html"
71       },
72       {
73         "deprecated": null,
74         "alias": null,
75         "protected": false,
76         "tagname": "method",
77         "href": "Template2.html#Ext-Template-method-append",
78         "shortDoc": "Applies the supplied values to the template and appends\nthe new node(s) to the specified el. ...",
79         "static": false,
80         "filename": "/mnt/ebs/nightly/git/SDK/platform/src/Template.js",
81         "private": false,
82         "params": [
83           {
84             "type": "Mixed",
85             "optional": false,
86             "doc": "<p>The context element</p>\n",
87             "name": "el"
88           },
89           {
90             "type": "Object/Array",
91             "optional": false,
92             "doc": "<p>The template values. Can be an array if the params are numeric (i.e. <code>{0}</code>)\nor an object (i.e. <code>{foo: 'bar'}</code>).</p>\n",
93             "name": "values"
94           },
95           {
96             "type": "Boolean",
97             "optional": true,
98             "doc": "<p>(optional) true to return an <a href=\"#/api/Ext.core.Element\" rel=\"Ext.core.Element\" class=\"docClass\">Ext.core.Element</a> (defaults to undefined)</p>\n",
99             "name": "returnElement"
100           }
101         ],
102         "name": "append",
103         "owner": "Ext.Template",
104         "doc": "<p>Applies the supplied <code>values</code> to the template and appends\nthe new node(s) to the specified <code>el</code>.</p>\n\n<p>For example usage see the constructor.</p>\n\n",
105         "linenr": 235,
106         "return": {
107           "type": "HTMLElement/Ext.core.Element",
108           "doc": "<p>The new node or Element</p>\n"
109         },
110         "html_filename": "Template2.html"
111       },
112       {
113         "deprecated": null,
114         "alias": null,
115         "protected": false,
116         "tagname": "method",
117         "href": "XTemplate.html#Ext-XTemplate-method-apply",
118         "shortDoc": "Alias for applyTemplate\nReturns an HTML fragment of this template with the specified values applied. ...",
119         "static": false,
120         "filename": "/mnt/ebs/nightly/git/SDK/platform/src/XTemplate.js",
121         "private": false,
122         "params": [
123           {
124             "type": "Object/Array",
125             "optional": false,
126             "doc": "<p>The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})</p>\n",
127             "name": "values"
128           }
129         ],
130         "name": "apply",
131         "owner": "Ext.XTemplate",
132         "doc": "<p>Alias for <a href=\"#/api/Ext.XTemplate-method-applyTemplate\" rel=\"Ext.XTemplate-method-applyTemplate\" class=\"docClass\">applyTemplate</a>\nReturns an HTML fragment of this template with the specified values applied.</p>\n",
133         "linenr": 488,
134         "return": {
135           "type": "String",
136           "doc": "<p>The HTML fragment</p>\n"
137         },
138         "html_filename": "XTemplate.html"
139       },
140       {
141         "deprecated": null,
142         "alias": null,
143         "protected": false,
144         "tagname": "method",
145         "href": "XTemplate.html#Ext-XTemplate-method-applyTemplate",
146         "shortDoc": "Returns an HTML fragment of this template with the specified values applied. ...",
147         "static": false,
148         "filename": "/mnt/ebs/nightly/git/SDK/platform/src/XTemplate.js",
149         "private": false,
150         "params": [
151           {
152             "type": "Object",
153             "optional": false,
154             "doc": "<p>The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})</p>\n",
155             "name": "values"
156           }
157         ],
158         "name": "applyTemplate",
159         "owner": "Ext.XTemplate",
160         "doc": "<p>Returns an HTML fragment of this template with the specified values applied.</p>\n",
161         "linenr": 471,
162         "return": {
163           "type": "String",
164           "doc": "<p>The HTML fragment</p>\n"
165         },
166         "html_filename": "XTemplate.html"
167       },
168       {
169         "deprecated": null,
170         "alias": null,
171         "protected": false,
172         "tagname": "method",
173         "href": "Base3.html#Ext-Base-method-callOverridden",
174         "shortDoc": "Call the original method that was previously overridden with Ext.Base.override\n\nExt.define('My.Cat', {\n    constructo...",
175         "static": false,
176         "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/class/Base.js",
177         "private": false,
178         "params": [
179           {
180             "type": "Array/Arguments",
181             "optional": false,
182             "doc": "<p>The arguments, either an array or the <code>arguments</code> object</p>\n",
183             "name": "args"
184           }
185         ],
186         "name": "callOverridden",
187         "owner": "Ext.Base",
188         "doc": "<p>Call the original method that was previously overridden with <a href=\"#/api/Ext.Base-method-override\" rel=\"Ext.Base-method-override\" class=\"docClass\">Ext.Base.override</a></p>\n\n<pre><code>Ext.define('My.Cat', {\n    constructor: function() {\n        alert(\"I'm a cat!\");\n\n        return this;\n    }\n});\n\nMy.Cat.override({\n    constructor: function() {\n        alert(\"I'm going to be a cat!\");\n\n        var instance = this.callOverridden();\n\n        alert(\"Meeeeoooowwww\");\n\n        return instance;\n    }\n});\n\nvar kitty = new My.Cat(); // alerts \"I'm going to be a cat!\"\n                          // alerts \"I'm a cat!\"\n                          // alerts \"Meeeeoooowwww\"\n</code></pre>\n",
189         "linenr": 269,
190         "return": {
191           "type": "Mixed",
192           "doc": "<p>Returns the result after calling the overridden method</p>\n"
193         },
194         "html_filename": "Base3.html"
195       },
196       {
197         "deprecated": null,
198         "alias": null,
199         "protected": true,
200         "tagname": "method",
201         "href": "Base3.html#Ext-Base-method-callParent",
202         "shortDoc": "Call the parent's overridden method. ...",
203         "static": false,
204         "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/class/Base.js",
205         "private": false,
206         "params": [
207           {
208             "type": "Array/Arguments",
209             "optional": false,
210             "doc": "<p>The arguments, either an array or the <code>arguments</code> object\nfrom the current method, for example: <code>this.callParent(arguments)</code></p>\n",
211             "name": "args"
212           }
213         ],
214         "name": "callParent",
215         "owner": "Ext.Base",
216         "doc": "<p>Call the parent's overridden method. For example:</p>\n\n<pre><code>Ext.define('My.own.A', {\n    constructor: function(test) {\n        alert(test);\n    }\n});\n\nExt.define('My.own.B', {\n    extend: 'My.own.A',\n\n    constructor: function(test) {\n        alert(test);\n\n        this.callParent([test + 1]);\n    }\n});\n\nExt.define('My.own.C', {\n    extend: 'My.own.B',\n\n    constructor: function() {\n        alert(\"Going to call parent's overriden constructor...\");\n\n        this.callParent(arguments);\n    }\n});\n\nvar a = new My.own.A(1); // alerts '1'\nvar b = new My.own.B(1); // alerts '1', then alerts '2'\nvar c = new My.own.C(2); // alerts \"Going to call parent's overriden constructor...\"\n                         // alerts '2', then alerts '3'\n</code></pre>\n",
217         "linenr": 124,
218         "return": {
219           "type": "Mixed",
220           "doc": "<p>Returns the result from the superclass' method</p>\n"
221         },
222         "html_filename": "Base3.html"
223       },
224       {
225         "deprecated": null,
226         "alias": null,
227         "protected": false,
228         "tagname": "method",
229         "href": "XTemplate.html#Ext-XTemplate-method-compile",
230         "shortDoc": "Compile the template to a function for optimized performance. ...",
231         "static": false,
232         "filename": "/mnt/ebs/nightly/git/SDK/platform/src/XTemplate.js",
233         "private": false,
234         "params": [
235
236         ],
237         "name": "compile",
238         "owner": "Ext.XTemplate",
239         "doc": "<p>Compile the template to a function for optimized performance.  Recommended if the template will be used frequently.</p>\n",
240         "linenr": 480,
241         "return": {
242           "type": "Function",
243           "doc": "<p>The compiled function</p>\n"
244         },
245         "html_filename": "XTemplate.html"
246       },
247       {
248         "deprecated": null,
249         "alias": null,
250         "protected": false,
251         "tagname": "method",
252         "href": "Base3.html#Ext-Base-method-create",
253         "shortDoc": "Create a new instance of this Class. ...",
254         "static": true,
255         "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/class/Base.js",
256         "private": false,
257         "params": [
258
259         ],
260         "name": "create",
261         "owner": "Ext.Base",
262         "doc": "<p>Create a new instance of this Class.</p>\n\n<pre><code>Ext.define('My.cool.Class', {\n    ...\n});\n\nMy.cool.Class.create({\n    someConfig: true\n});\n</code></pre>\n\n<p>All parameters are passed to the constructor of the class.</p>\n",
263         "linenr": 329,
264         "return": {
265           "type": "Object",
266           "doc": "<p>the created instance.</p>\n"
267         },
268         "html_filename": "Base3.html"
269       },
270       {
271         "deprecated": null,
272         "alias": null,
273         "protected": false,
274         "tagname": "method",
275         "href": "Base3.html#Ext-Base-method-createAlias",
276         "shortDoc": "Create aliases for existing prototype methods. ...",
277         "static": true,
278         "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/class/Base.js",
279         "private": false,
280         "params": [
281           {
282             "type": "String/Object",
283             "optional": false,
284             "doc": "<p>The new method name, or an object to set multiple aliases. See\n<a href=\"#/api/Ext.Function-method-flexSetter\" rel=\"Ext.Function-method-flexSetter\" class=\"docClass\">flexSetter</a></p>\n",
285             "name": "alias"
286           },
287           {
288             "type": "String/Object",
289             "optional": false,
290             "doc": "<p>The original method name</p>\n",
291             "name": "origin"
292           }
293         ],
294         "name": "createAlias",
295         "owner": "Ext.Base",
296         "doc": "<p>Create aliases for existing prototype methods. Example:</p>\n\n<pre><code>Ext.define('My.cool.Class', {\n    method1: function() { ... },\n    method2: function() { ... }\n});\n\nvar test = new My.cool.Class();\n\nMy.cool.Class.createAlias({\n    method3: 'method1',\n    method4: 'method2'\n});\n\ntest.method3(); // test.method1()\n\nMy.cool.Class.createAlias('method5', 'method3');\n\ntest.method5(); // test.method3() -&gt; test.method1()\n</code></pre>\n",
297         "linenr": 648,
298         "return": {
299           "type": "void",
300           "doc": "\n"
301         },
302         "html_filename": "Base3.html"
303       },
304       {
305         "deprecated": null,
306         "alias": null,
307         "protected": false,
308         "tagname": "method",
309         "href": "XTemplate.html#Ext-XTemplate-method-from",
310         "shortDoc": "Creates a template from the passed element's value (display:none textarea, preferred) or innerHTML. ...",
311         "static": true,
312         "filename": "/mnt/ebs/nightly/git/SDK/platform/src/XTemplate.js",
313         "private": false,
314         "params": [
315           {
316             "type": "String/HTMLElement",
317             "optional": false,
318             "doc": "<p>A DOM element or its id</p>\n",
319             "name": "el"
320           },
321           {
322             "type": "Object",
323             "optional": false,
324             "doc": "\n",
325             "name": "config"
326           }
327         ],
328         "name": "from",
329         "owner": "Ext.XTemplate",
330         "doc": "<p>Creates a template from the passed element's value (<i>display:none</i> textarea, preferred) or innerHTML.</p>\n",
331         "linenr": 268,
332         "return": {
333           "type": "Ext.Template",
334           "doc": "<p>The created template</p>\n"
335         },
336         "html_filename": "XTemplate.html"
337       },
338       {
339         "deprecated": null,
340         "alias": null,
341         "protected": false,
342         "tagname": "method",
343         "href": "Base3.html#Ext-Base-method-getName",
344         "shortDoc": "Get the current class' name in string format. ...",
345         "static": false,
346         "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/class/Base.js",
347         "private": false,
348         "params": [
349
350         ],
351         "name": "getName",
352         "owner": "Ext.Base",
353         "doc": "<p>Get the current class' name in string format.</p>\n\n<pre><code>Ext.define('My.cool.Class', {\n    constructor: function() {\n        alert(this.self.getName()); // alerts 'My.cool.Class'\n    }\n});\n\nMy.cool.Class.getName(); // 'My.cool.Class'\n</code></pre>\n",
354         "linenr": 631,
355         "return": {
356           "type": "String",
357           "doc": "<p>className</p>\n"
358         },
359         "html_filename": "Base3.html"
360       },
361       {
362         "deprecated": null,
363         "alias": null,
364         "protected": false,
365         "tagname": "method",
366         "href": "Base3.html#Ext-Base-method-implement",
367         "shortDoc": "Add methods / properties to the prototype of this class. ...",
368         "static": true,
369         "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/class/Base.js",
370         "private": false,
371         "params": [
372           {
373             "type": "Object",
374             "optional": false,
375             "doc": "\n",
376             "name": "members"
377           }
378         ],
379         "name": "implement",
380         "owner": "Ext.Base",
381         "doc": "<p>Add methods / properties to the prototype of this class.</p>\n\n<pre><code>Ext.define('My.awesome.Cat', {\n    constructor: function() {\n        ...\n    }\n});\n\n My.awesome.Cat.implement({\n     meow: function() {\n        alert('Meowww...');\n     }\n });\n\n var kitty = new My.awesome.Cat;\n kitty.meow();\n</code></pre>\n",
382         "linenr": 415,
383         "return": {
384           "type": "void",
385           "doc": "\n"
386         },
387         "html_filename": "Base3.html"
388       },
389       {
390         "deprecated": null,
391         "alias": null,
392         "protected": true,
393         "tagname": "method",
394         "href": "Base3.html#Ext-Base-method-initConfig",
395         "shortDoc": "Initialize configuration for this class. ...",
396         "static": false,
397         "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/class/Base.js",
398         "private": false,
399         "params": [
400           {
401             "type": "Object",
402             "optional": false,
403             "doc": "\n",
404             "name": "config"
405           }
406         ],
407         "name": "initConfig",
408         "owner": "Ext.Base",
409         "doc": "<p>Initialize configuration for this class. a typical example:</p>\n\n<pre><code>Ext.define('My.awesome.Class', {\n    // The default config\n    config: {\n        name: 'Awesome',\n        isAwesome: true\n    },\n\n    constructor: function(config) {\n        this.initConfig(config);\n\n        return this;\n    }\n});\n\nvar awesome = new My.awesome.Class({\n    name: 'Super Awesome'\n});\n\nalert(awesome.getName()); // 'Super Awesome'\n</code></pre>\n",
410         "linenr": 63,
411         "return": {
412           "type": "Object",
413           "doc": "<p>mixins The mixin prototypes as key - value pairs</p>\n"
414         },
415         "html_filename": "Base3.html"
416       },
417       {
418         "deprecated": null,
419         "alias": null,
420         "protected": false,
421         "tagname": "method",
422         "href": "Template2.html#Ext-Template-method-insertAfter",
423         "shortDoc": "Applies the supplied values to the template and inserts the new node(s) after el. ...",
424         "static": false,
425         "filename": "/mnt/ebs/nightly/git/SDK/platform/src/Template.js",
426         "private": false,
427         "params": [
428           {
429             "type": "Mixed",
430             "optional": false,
431             "doc": "<p>The context element</p>\n",
432             "name": "el"
433           },
434           {
435             "type": "Object/Array",
436             "optional": false,
437             "doc": "<p>The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})</p>\n",
438             "name": "values"
439           },
440           {
441             "type": "Boolean",
442             "optional": true,
443             "doc": "<p>(optional) true to return a <a href=\"#/api/Ext.core.Element\" rel=\"Ext.core.Element\" class=\"docClass\">Ext.core.Element</a> (defaults to undefined)</p>\n",
444             "name": "returnElement"
445           }
446         ],
447         "name": "insertAfter",
448         "owner": "Ext.Template",
449         "doc": "<p>Applies the supplied values to the template and inserts the new node(s) after el.</p>\n",
450         "linenr": 224,
451         "return": {
452           "type": "HTMLElement/Ext.core.Element",
453           "doc": "<p>The new node or Element</p>\n"
454         },
455         "html_filename": "Template2.html"
456       },
457       {
458         "deprecated": null,
459         "alias": null,
460         "protected": false,
461         "tagname": "method",
462         "href": "Template2.html#Ext-Template-method-insertBefore",
463         "shortDoc": "Applies the supplied values to the template and inserts the new node(s) before el. ...",
464         "static": false,
465         "filename": "/mnt/ebs/nightly/git/SDK/platform/src/Template.js",
466         "private": false,
467         "params": [
468           {
469             "type": "Mixed",
470             "optional": false,
471             "doc": "<p>The context element</p>\n",
472             "name": "el"
473           },
474           {
475             "type": "Object/Array",
476             "optional": false,
477             "doc": "<p>The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})</p>\n",
478             "name": "values"
479           },
480           {
481             "type": "Boolean",
482             "optional": true,
483             "doc": "<p>(optional) true to return a <a href=\"#/api/Ext.core.Element\" rel=\"Ext.core.Element\" class=\"docClass\">Ext.core.Element</a> (defaults to undefined)</p>\n",
484             "name": "returnElement"
485           }
486         ],
487         "name": "insertBefore",
488         "owner": "Ext.Template",
489         "doc": "<p>Applies the supplied values to the template and inserts the new node(s) before el.</p>\n",
490         "linenr": 213,
491         "return": {
492           "type": "HTMLElement/Ext.core.Element",
493           "doc": "<p>The new node or Element</p>\n"
494         },
495         "html_filename": "Template2.html"
496       },
497       {
498         "deprecated": null,
499         "alias": null,
500         "protected": false,
501         "tagname": "method",
502         "href": "Template2.html#Ext-Template-method-insertFirst",
503         "shortDoc": "Applies the supplied values to the template and inserts the new node(s) as the first child of el. ...",
504         "static": false,
505         "filename": "/mnt/ebs/nightly/git/SDK/platform/src/Template.js",
506         "private": false,
507         "params": [
508           {
509             "type": "Mixed",
510             "optional": false,
511             "doc": "<p>The context element</p>\n",
512             "name": "el"
513           },
514           {
515             "type": "Object/Array",
516             "optional": false,
517             "doc": "<p>The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})</p>\n",
518             "name": "values"
519           },
520           {
521             "type": "Boolean",
522             "optional": true,
523             "doc": "<p>(optional) true to return a <a href=\"#/api/Ext.core.Element\" rel=\"Ext.core.Element\" class=\"docClass\">Ext.core.Element</a> (defaults to undefined)</p>\n",
524             "name": "returnElement"
525           }
526         ],
527         "name": "insertFirst",
528         "owner": "Ext.Template",
529         "doc": "<p>Applies the supplied values to the template and inserts the new node(s) as the first child of el.</p>\n",
530         "linenr": 202,
531         "return": {
532           "type": "HTMLElement/Ext.core.Element",
533           "doc": "<p>The new node or Element</p>\n"
534         },
535         "html_filename": "Template2.html"
536       },
537       {
538         "deprecated": null,
539         "alias": null,
540         "protected": false,
541         "tagname": "method",
542         "href": "Base3.html#Ext-Base-method-override",
543         "shortDoc": "Override prototype members of this class. ...",
544         "static": true,
545         "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/class/Base.js",
546         "private": false,
547         "params": [
548           {
549             "type": "Object",
550             "optional": false,
551             "doc": "\n",
552             "name": "members"
553           }
554         ],
555         "name": "override",
556         "owner": "Ext.Base",
557         "doc": "<p>Override prototype members of this class. Overridden methods can be invoked via\n<a href=\"#/api/Ext.Base-method-callOverridden\" rel=\"Ext.Base-method-callOverridden\" class=\"docClass\">Ext.Base.callOverridden</a></p>\n\n<pre><code>Ext.define('My.Cat', {\n    constructor: function() {\n        alert(\"I'm a cat!\");\n\n        return this;\n    }\n});\n\nMy.Cat.override({\n    constructor: function() {\n        alert(\"I'm going to be a cat!\");\n\n        var instance = this.callOverridden();\n\n        alert(\"Meeeeoooowwww\");\n\n        return instance;\n    }\n});\n\nvar kitty = new My.Cat(); // alerts \"I'm going to be a cat!\"\n                          // alerts \"I'm a cat!\"\n                          // alerts \"Meeeeoooowwww\"\n</code></pre>\n",
558         "linenr": 518,
559         "return": {
560           "type": "Ext.Base",
561           "doc": "<p>this</p>\n"
562         },
563         "html_filename": "Base3.html"
564       },
565       {
566         "deprecated": null,
567         "alias": null,
568         "protected": false,
569         "tagname": "method",
570         "href": "Template2.html#Ext-Template-method-overwrite",
571         "shortDoc": "Applies the supplied values to the template and overwrites the content of el with the new node(s). ...",
572         "static": false,
573         "filename": "/mnt/ebs/nightly/git/SDK/platform/src/Template.js",
574         "private": false,
575         "params": [
576           {
577             "type": "Mixed",
578             "optional": false,
579             "doc": "<p>The context element</p>\n",
580             "name": "el"
581           },
582           {
583             "type": "Object/Array",
584             "optional": false,
585             "doc": "<p>The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})</p>\n",
586             "name": "values"
587           },
588           {
589             "type": "Boolean",
590             "optional": true,
591             "doc": "<p>(optional) true to return a <a href=\"#/api/Ext.core.Element\" rel=\"Ext.core.Element\" class=\"docClass\">Ext.core.Element</a> (defaults to undefined)</p>\n",
592             "name": "returnElement"
593           }
594         ],
595         "name": "overwrite",
596         "owner": "Ext.Template",
597         "doc": "<p>Applies the supplied values to the template and overwrites the content of el with the new node(s).</p>\n",
598         "linenr": 256,
599         "return": {
600           "type": "HTMLElement/Ext.core.Element",
601           "doc": "<p>The new node or Element</p>\n"
602         },
603         "html_filename": "Template2.html"
604       },
605       {
606         "deprecated": null,
607         "alias": null,
608         "protected": false,
609         "tagname": "method",
610         "href": "Template2.html#Ext-Template-method-set",
611         "shortDoc": "Sets the HTML used as the template and optionally compiles it. ...",
612         "static": false,
613         "filename": "/mnt/ebs/nightly/git/SDK/platform/src/Template.js",
614         "private": false,
615         "params": [
616           {
617             "type": "String",
618             "optional": false,
619             "doc": "\n",
620             "name": "html"
621           },
622           {
623             "type": "Boolean",
624             "optional": true,
625             "doc": "<p>(optional) True to compile the template (defaults to undefined)</p>\n",
626             "name": "compile"
627           }
628         ],
629         "name": "set",
630         "owner": "Ext.Template",
631         "doc": "<p>Sets the HTML used as the template and optionally compiles it.</p>\n",
632         "linenr": 153,
633         "return": {
634           "type": "Ext.Template",
635           "doc": "<p>this</p>\n"
636         },
637         "html_filename": "Template2.html"
638       },
639       {
640         "deprecated": null,
641         "alias": null,
642         "protected": true,
643         "tagname": "method",
644         "href": "Base3.html#Ext-Base-method-statics",
645         "shortDoc": "Get the reference to the class from which this object was instantiated. ...",
646         "static": false,
647         "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/class/Base.js",
648         "private": false,
649         "params": [
650
651         ],
652         "name": "statics",
653         "owner": "Ext.Base",
654         "doc": "<p>Get the reference to the class from which this object was instantiated. Note that unlike <a href=\"#/api/Ext.Base-property-self\" rel=\"Ext.Base-property-self\" class=\"docClass\">Ext.Base.self</a>,\n<code>this.statics()</code> is scope-independent and it always returns the class from which it was called, regardless of what\n<code>this</code> points to during run-time</p>\n\n<pre><code>Ext.define('My.Cat', {\n    statics: {\n        totalCreated: 0,\n        speciesName: 'Cat' // My.Cat.speciesName = 'Cat'\n    },\n\n    constructor: function() {\n        var statics = this.statics();\n\n        alert(statics.speciesName);     // always equals to 'Cat' no matter what 'this' refers to\n                                        // equivalent to: My.Cat.speciesName\n\n        alert(this.self.speciesName);   // dependent on 'this'\n\n        statics.totalCreated++;\n\n        return this;\n    },\n\n    clone: function() {\n        var cloned = new this.self;                      // dependent on 'this'\n\n        cloned.groupName = this.statics().speciesName;   // equivalent to: My.Cat.speciesName\n\n        return cloned;\n    }\n});\n\n\nExt.define('My.SnowLeopard', {\n    extend: 'My.Cat',\n\n    statics: {\n        speciesName: 'Snow Leopard'     // My.SnowLeopard.speciesName = 'Snow Leopard'\n    },\n\n    constructor: function() {\n        this.callParent();\n    }\n});\n\nvar cat = new My.Cat();                 // alerts 'Cat', then alerts 'Cat'\n\nvar snowLeopard = new My.SnowLeopard(); // alerts 'Cat', then alerts 'Snow Leopard'\n\nvar clone = snowLeopard.clone();\nalert(Ext.getClassName(clone));         // alerts 'My.SnowLeopard'\nalert(clone.groupName);                 // alerts 'Cat'\n\nalert(My.Cat.totalCreated);             // alerts 3\n</code></pre>\n",
655         "linenr": 199,
656         "return": {
657           "type": "Class",
658           "doc": "\n"
659         },
660         "html_filename": "Base3.html"
661       }
662     ],
663     "property": [
664       {
665         "type": "Class",
666         "deprecated": null,
667         "alias": null,
668         "protected": true,
669         "tagname": "property",
670         "href": "Base3.html#Ext-Base-property-self",
671         "shortDoc": "Get the reference to the current class from which this object was instantiated. ...",
672         "static": false,
673         "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/class/Base.js",
674         "private": false,
675         "name": "self",
676         "owner": "Ext.Base",
677         "doc": "<p>Get the reference to the current class from which this object was instantiated. Unlike <a href=\"#/api/Ext.Base-method-statics\" rel=\"Ext.Base-method-statics\" class=\"docClass\">Ext.Base.statics</a>,\n<code>this.self</code> is scope-dependent and it's meant to be used for dynamic inheritance. See <a href=\"#/api/Ext.Base-method-statics\" rel=\"Ext.Base-method-statics\" class=\"docClass\">Ext.Base.statics</a>\nfor a detailed comparison</p>\n\n<pre><code>Ext.define('My.Cat', {\n    statics: {\n        speciesName: 'Cat' // My.Cat.speciesName = 'Cat'\n    },\n\n    constructor: function() {\n        alert(this.self.speciesName); / dependent on 'this'\n\n        return this;\n    },\n\n    clone: function() {\n        return new this.self();\n    }\n});\n\n\nExt.define('My.SnowLeopard', {\n    extend: 'My.Cat',\n    statics: {\n        speciesName: 'Snow Leopard'         // My.SnowLeopard.speciesName = 'Snow Leopard'\n    }\n});\n\nvar cat = new My.Cat();                     // alerts 'Cat'\nvar snowLeopard = new My.SnowLeopard();     // alerts 'Snow Leopard'\n\nvar clone = snowLeopard.clone();\nalert(Ext.getClassName(clone));             // alerts 'My.SnowLeopard'\n</code></pre>\n",
678         "linenr": 18,
679         "html_filename": "Base3.html"
680       }
681     ],
682     "cssVar": [
683
684     ],
685     "cssMixin": [
686
687     ],
688     "event": [
689
690     ]
691   },
692   "singleton": false,
693   "alias": null,
694   "superclasses": [
695     "Ext.Base",
696     "Ext.Template"
697   ],
698   "protected": false,
699   "tagname": "class",
700   "mixins": [
701
702   ],
703   "href": "XTemplate.html#Ext-XTemplate",
704   "subclasses": [
705
706   ],
707   "static": false,
708   "author": null,
709   "component": false,
710   "filename": "/mnt/ebs/nightly/git/SDK/platform/src/XTemplate.js",
711   "private": false,
712   "alternateClassNames": [
713
714   ],
715   "name": "Ext.XTemplate",
716   "doc": "<p>A template class that supports advanced functionality like:<div class=\"mdetail-params\"><ul>\n<li>Autofilling arrays using templates and sub-templates</li>\n<li>Conditional processing with basic comparison operators</li>\n<li>Basic math function support</li>\n<li>Execute arbitrary inline code with special built-in template variables</li>\n<li>Custom member functions</li>\n<li>Many special tags and built-in operators that aren't defined as part of\nthe API, but are supported in the templates that can be created</li>\n</ul></div></p>\n\n\n<p>XTemplate provides the templating mechanism built into:<div class=\"mdetail-params\"><ul>\n<li><a href=\"#/api/Ext.view.View\" rel=\"Ext.view.View\" class=\"docClass\">Ext.view.View</a></li>\n</ul></div></p>\n\n\n<p>The <a href=\"#/api/Ext.Template\" rel=\"Ext.Template\" class=\"docClass\">Ext.Template</a> describes\nthe acceptable parameters to pass to the constructor. The following\nexamples demonstrate all of the supported features.</p></p>\n\n<div class=\"mdetail-params\"><ul>\n\n<li><b><u>Sample Data</u></b>\n<div class=\"sub-desc\">\n<p>This is the data object used for reference in each code example:</p>\n<pre><code>var data = {\nname: 'Tommy Maintz',\ntitle: 'Lead Developer',\ncompany: 'Sencha Inc.',\nemail: 'tommy@sencha.com',\naddress: '5 Cups Drive',\ncity: 'Palo Alto',\nstate: 'CA',\nzip: '44102',\ndrinks: ['Coffee', 'Soda', 'Water'],\nkids: [{\n        name: 'Joshua',\n        age:3\n    },{\n        name: 'Matthew',\n        age:2\n    },{\n        name: 'Solomon',\n        age:0\n}]\n};\n </code></pre>\n</div>\n</li>\n\n\n<li><b><u>Auto filling of arrays</u></b>\n<div class=\"sub-desc\">\n<p>The <b><tt>tpl</tt></b> tag and the <b><tt>for</tt></b> operator are used\nto process the provided data object:\n<ul>\n<li>If the value specified in <tt>for</tt> is an array, it will auto-fill,\nrepeating the template block inside the <tt>tpl</tt> tag for each item in the\narray.</li>\n<li>If <tt>for=\".\"</tt> is specified, the data object provided is examined.</li>\n<li>While processing an array, the special variable <tt>{#}</tt>\nwill provide the current array index + 1 (starts at 1, not 0).</li>\n</ul>\n</p>\n<pre><code>&lt;tpl <b>for</b>=\".\">...&lt;/tpl>       // loop through array at root node\n&lt;tpl <b>for</b>=\"foo\">...&lt;/tpl>     // loop through array at foo node\n&lt;tpl <b>for</b>=\"foo.bar\">...&lt;/tpl> // loop through array at foo.bar node\n </code></pre>\nUsing the sample data above:\n<pre><code>var tpl = new Ext.XTemplate(\n    '&lt;p>Kids: ',\n    '&lt;tpl <b>for</b>=\".\">',       // process the data.kids node\n        '&lt;p>{#}. {name}&lt;/p>',  // use current array index to autonumber\n    '&lt;/tpl>&lt;/p>'\n);\ntpl.overwrite(panel.body, data.kids); // pass the kids property of the data object\n </code></pre>\n<p>An example illustrating how the <b><tt>for</tt></b> property can be leveraged\nto access specified members of the provided data object to populate the template:</p>\n<pre><code>var tpl = new Ext.XTemplate(\n    '&lt;p>Name: {name}&lt;/p>',\n    '&lt;p>Title: {title}&lt;/p>',\n    '&lt;p>Company: {company}&lt;/p>',\n    '&lt;p>Kids: ',\n    '&lt;tpl <b>for=\"kids\"</b>>',     // interrogate the kids property within the data\n        '&lt;p>{name}&lt;/p>',\n    '&lt;/tpl>&lt;/p>'\n);\ntpl.overwrite(panel.body, data);  // pass the root node of the data object\n </code></pre>\n<p>Flat arrays that contain values (and not objects) can be auto-rendered\nusing the special <b><tt>{.}</tt></b> variable inside a loop.  This variable\nwill represent the value of the array at the current index:</p>\n<pre><code>var tpl = new Ext.XTemplate(\n    '&lt;p>{name}\\&#39;s favorite beverages:&lt;/p>',\n    '&lt;tpl for=\"drinks\">',\n        '&lt;div> - {.}&lt;/div>',\n    '&lt;/tpl>'\n);\ntpl.overwrite(panel.body, data);\n </code></pre>\n<p>When processing a sub-template, for example while looping through a child array,\nyou can access the parent object's members via the <b><tt>parent</tt></b> object:</p>\n<pre><code>var tpl = new Ext.XTemplate(\n    '&lt;p>Name: {name}&lt;/p>',\n    '&lt;p>Kids: ',\n    '&lt;tpl for=\"kids\">',\n        '&lt;tpl if=\"age &amp;gt; 1\">',\n            '&lt;p>{name}&lt;/p>',\n            '&lt;p>Dad: {<b>parent</b>.name}&lt;/p>',\n        '&lt;/tpl>',\n    '&lt;/tpl>&lt;/p>'\n);\ntpl.overwrite(panel.body, data);\n </code></pre>\n</div>\n</li>\n\n\n<li><b><u>Conditional processing with basic comparison operators</u></b>\n<div class=\"sub-desc\">\n<p>The <b><tt>tpl</tt></b> tag and the <b><tt>if</tt></b> operator are used\nto provide conditional checks for deciding whether or not to render specific\nparts of the template. Notes:<div class=\"sub-desc\"><ul>\n<li>Double quotes must be encoded if used within the conditional</li>\n<li>There is no <tt>else</tt> operator &mdash; if needed, two opposite\n<tt>if</tt> statements should be used.</li>\n</ul></div>\n<pre><code>&lt;tpl if=\"age &gt; 1 &amp;&amp; age &lt; 10\">Child&lt;/tpl>\n&lt;tpl if=\"age >= 10 && age < 18\">Teenager&lt;/tpl>\n&lt;tpl <b>if</b>=\"this.isGirl(name)\">...&lt;/tpl>\n&lt;tpl <b>if</b>=\"id==\\'download\\'\">...&lt;/tpl>\n&lt;tpl <b>if</b>=\"needsIcon\">&lt;img src=\"{icon}\" class=\"{iconCls}\"/>&lt;/tpl>\n// no good:\n&lt;tpl if=\"name == \"Tommy\"\">Hello&lt;/tpl>\n// encode &#34; if it is part of the condition, e.g.\n&lt;tpl if=\"name == &#38;quot;Tommy&#38;quot;\">Hello&lt;/tpl>\n</code></pre>\nUsing the sample data above:\n<pre><code>var tpl = new Ext.XTemplate(\n    '&lt;p>Name: {name}&lt;/p>',\n    '&lt;p>Kids: ',\n    '&lt;tpl for=\"kids\">',\n        '&lt;tpl if=\"age &amp;gt; 1\">',\n            '&lt;p>{name}&lt;/p>',\n        '&lt;/tpl>',\n    '&lt;/tpl>&lt;/p>'\n);\ntpl.overwrite(panel.body, data);\n </code></pre>\n</div>\n</li>\n\n\n<li><b><u>Basic math support</u></b>\n<div class=\"sub-desc\">\n<p>The following basic math operators may be applied directly on numeric\ndata values:</p>\n<pre>+ - * /\n</pre>\nFor example:\n<pre><code>var tpl = new Ext.XTemplate(\n    '&lt;p>Name: {name}&lt;/p>',\n    '&lt;p>Kids: ',\n    '&lt;tpl for=\"kids\">',\n        '&lt;tpl if=\"age &amp;gt; 1\">',  // <-- Note that the &gt; is encoded\n            '&lt;p>{#}: {name}&lt;/p>',  // <-- Auto-number each item\n            '&lt;p>In 5 Years: {age+5}&lt;/p>',  // <-- Basic math\n            '&lt;p>Dad: {parent.name}&lt;/p>',\n        '&lt;/tpl>',\n    '&lt;/tpl>&lt;/p>'\n);\ntpl.overwrite(panel.body, data);\n </code></pre>\n</div>\n</li>\n\n\n<li><b><u>Execute arbitrary inline code with special built-in template variables</u></b>\n<div class=\"sub-desc\">\n<p>Anything between <code>{[ ... ]}</code> is considered code to be executed\nin the scope of the template. There are some special variables available in that code:\n<ul>\n<li><b><tt>values</tt></b>: The values in the current scope. If you are using\nscope changing sub-templates, you can change what <tt>values</tt> is.</li>\n<li><b><tt>parent</tt></b>: The scope (values) of the ancestor template.</li>\n<li><b><tt>xindex</tt></b>: If you are in a looping template, the index of the\nloop you are in (1-based).</li>\n<li><b><tt>xcount</tt></b>: If you are in a looping template, the total length\nof the array you are looping.</li>\n</ul>\nThis example demonstrates basic row striping using an inline code block and the\n<tt>xindex</tt> variable:</p>\n<pre><code>var tpl = new Ext.XTemplate(\n    '&lt;p>Name: {name}&lt;/p>',\n    '&lt;p>Company: {[values.company.toUpperCase() + \", \" + values.title]}&lt;/p>',\n    '&lt;p>Kids: ',\n    '&lt;tpl for=\"kids\">',\n        '&lt;div class=\"{[xindex % 2 === 0 ? \"even\" : \"odd\"]}\">',\n        '{name}',\n        '&lt;/div>',\n    '&lt;/tpl>&lt;/p>'\n );\ntpl.overwrite(panel.body, data);\n </code></pre>\n</div>\n</li>\n\n<li><b><u>Template member functions</u></b>\n<div class=\"sub-desc\">\n<p>One or more member functions can be specified in a configuration\nobject passed into the XTemplate constructor for more complex processing:</p>\n<pre><code>var tpl = new Ext.XTemplate(\n    '&lt;p>Name: {name}&lt;/p>',\n    '&lt;p>Kids: ',\n    '&lt;tpl for=\"kids\">',\n        '&lt;tpl if=\"this.isGirl(name)\">',\n            '&lt;p>Girl: {name} - {age}&lt;/p>',\n        '&lt;/tpl>',\n         // use opposite if statement to simulate 'else' processing:\n        '&lt;tpl if=\"this.isGirl(name) == false\">',\n            '&lt;p>Boy: {name} - {age}&lt;/p>',\n        '&lt;/tpl>',\n        '&lt;tpl if=\"this.isBaby(age)\">',\n            '&lt;p>{name} is a baby!&lt;/p>',\n        '&lt;/tpl>',\n    '&lt;/tpl>&lt;/p>',\n    {\n        // XTemplate configuration:\n        compiled: true,\n        // member functions:\n        isGirl: function(name){\n           return name == 'Sara Grace';\n        },\n        isBaby: function(age){\n           return age < 1;\n        }\n    }\n);\ntpl.overwrite(panel.body, data);\n </code></pre>\n</div>\n</li>\n\n</ul></div>\n\n",
717   "mixedInto": [
718
719   ],
720   "linenr": 1,
721   "xtypes": [
722
723   ],
724   "html_filename": "XTemplate.html",
725   "extends": "Ext.Template"
726 });