Fix #6893 - fix roo docs
[roojs1] / docs / symbols / Roo.DomTemplate.json
1 {
2   "name" : "Roo.DomTemplate",
3   "augments" : [
4     "Roo.Template"
5   ],
6   "desc" : "An effort at a dom based template engine..\n\nSimilar to XTemplate, except it uses dom parsing to create the template..\n\nSupported features:\n\n Tags:\n\n<pre><code>\n      {a_variable} - output encoded.\n      {a_variable.format:(\"Y-m-d\")} - call a method on the variable\n      {a_variable:raw} - unencoded output\n      {a_variable:toFixed(1,2)} - Roo.util.Format.\"toFixed\"\n      {a_variable:this.method_on_template(...)} - call a method on the template object.\n \n</code></pre>\n The tpl tag:\n<pre><code>\n        &lt;div roo-for=\"a_variable or condition..\"&gt;&lt;/div&gt;\n        &lt;div roo-if=\"a_variable or condition\"&gt;&lt;/div&gt;\n        &lt;div roo-exec=\"some javascript\"&gt;&lt;/div&gt;\n        &lt;div roo-name=\"named_template\"&gt;&lt;/div&gt; \n  \n</code></pre>",
7   "isSingleton" : false,
8   "isStatic" : false,
9   "isBuiltin" : false,
10   "memberOf" : "DomTemplate",
11   "example" : "",
12   "deprecated" : "",
13   "since" : "",
14   "see" : "",
15   "params" : [],
16   "returns" : [],
17   "config" : [
18     {
19       "name" : "onLoad",
20       "type" : "Function",
21       "desc" : "Called after the template has been loaded and complied (usually from a remove source)",
22       "memberOf" : "Roo.Template",
23       "optvals" : []
24     },
25     {
26       "name" : "html",
27       "type" : "String",
28       "desc" : "The HTML fragment or an array of fragments to join(\"\") or multiple arguments to join(\"\")",
29       "memberOf" : "Roo.Template",
30       "optvals" : []
31     },
32     {
33       "name" : "url",
34       "type" : "String",
35       "desc" : "The Url to load the template from. beware if you are loading from a url, the data may not be ready if you use it instantly..\n                   it should be fixed so that template is observable...",
36       "memberOf" : "Roo.Template",
37       "optvals" : []
38     }
39   ],
40   "methods" : [
41     {
42       "name" : "applySubTemplate",
43       "desc" : "same as applyTemplate, except it's done to one of the subTemplates\nwhen using named templates, you can do:\n\nvar str = pl.applySubTemplate('your-name', values);",
44       "isStatic" : false,
45       "isConstructor" : false,
46       "isPrivate" : false,
47       "memberOf" : "Roo.DomTemplate",
48       "example" : "",
49       "deprecated" : "",
50       "since" : "",
51       "see" : "",
52       "params" : [
53         {
54           "name" : "id",
55           "type" : "Number",
56           "desc" : "of the template",
57           "isOptional" : false
58         },
59         {
60           "name" : "values",
61           "type" : "Object",
62           "desc" : "to apply to template",
63           "isOptional" : false
64         },
65         {
66           "name" : "parent",
67           "type" : "Object",
68           "desc" : "(normaly the instance of this object)",
69           "isOptional" : false
70         }
71       ],
72       "returns" : []
73     },
74     {
75       "name" : "compile",
76       "desc" : "compile the template\n\nThis is not recursive, so I'm not sure how nested templates are really going to be handled..",
77       "isStatic" : false,
78       "isConstructor" : false,
79       "isPrivate" : false,
80       "memberOf" : "Roo.DomTemplate",
81       "example" : "",
82       "deprecated" : "",
83       "since" : "",
84       "see" : "",
85       "params" : [],
86       "returns" : []
87     },
88     {
89       "name" : "compileTpl",
90       "desc" : "Compile a segment of the template into a 'sub-template'",
91       "isStatic" : false,
92       "isConstructor" : false,
93       "isPrivate" : false,
94       "memberOf" : "Roo.DomTemplate",
95       "example" : "",
96       "deprecated" : "",
97       "since" : "",
98       "see" : "",
99       "params" : [],
100       "returns" : []
101     },
102     {
103       "name" : "insertFirst",
104       "desc" : "Applies the supplied values to the template and inserts the new node(s) as the first child of el.",
105       "isStatic" : false,
106       "isConstructor" : false,
107       "isPrivate" : false,
108       "memberOf" : "Roo.Template",
109       "example" : "",
110       "deprecated" : "",
111       "since" : "",
112       "see" : "",
113       "params" : [
114         {
115           "name" : "el",
116           "type" : "String/HTMLElement/Roo.Element",
117           "desc" : "The context element",
118           "isOptional" : false
119         },
120         {
121           "name" : "values",
122           "type" : "Object",
123           "desc" : "The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})",
124           "isOptional" : false
125         },
126         {
127           "name" : "returnElement",
128           "type" : "Boolean",
129           "desc" : "(optional) true to return a Roo.Element (defaults to undefined)",
130           "isOptional" : false
131         }
132       ],
133       "returns" : [
134         {
135           "name" : "",
136           "type" : "HTMLElement/Roo.Element",
137           "desc" : "The new node or Element"
138         }
139       ]
140     },
141     {
142       "name" : "overwrite",
143       "desc" : "Applies the supplied values to the template and overwrites the content of el with the new node(s).",
144       "isStatic" : false,
145       "isConstructor" : false,
146       "isPrivate" : false,
147       "memberOf" : "Roo.Template",
148       "example" : "",
149       "deprecated" : "",
150       "since" : "",
151       "see" : "",
152       "params" : [
153         {
154           "name" : "el",
155           "type" : "String/HTMLElement/Roo.Element",
156           "desc" : "The context element",
157           "isOptional" : false
158         },
159         {
160           "name" : "values",
161           "type" : "Object",
162           "desc" : "The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})",
163           "isOptional" : false
164         },
165         {
166           "name" : "returnElement",
167           "type" : "Boolean",
168           "desc" : "(optional) true to return a Roo.Element (defaults to undefined)",
169           "isOptional" : false
170         }
171       ],
172       "returns" : [
173         {
174           "name" : "",
175           "type" : "HTMLElement/Roo.Element",
176           "desc" : "The new node or Element"
177         }
178       ]
179     },
180     {
181       "name" : "insertBefore",
182       "desc" : "Applies the supplied values to the template and inserts the new node(s) before el.",
183       "isStatic" : false,
184       "isConstructor" : false,
185       "isPrivate" : false,
186       "memberOf" : "Roo.Template",
187       "example" : "",
188       "deprecated" : "",
189       "since" : "",
190       "see" : "",
191       "params" : [
192         {
193           "name" : "el",
194           "type" : "String/HTMLElement/Roo.Element",
195           "desc" : "The context element",
196           "isOptional" : false
197         },
198         {
199           "name" : "values",
200           "type" : "Object",
201           "desc" : "The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})",
202           "isOptional" : false
203         },
204         {
205           "name" : "returnElement",
206           "type" : "Boolean",
207           "desc" : "(optional) true to return a Roo.Element (defaults to undefined)",
208           "isOptional" : false
209         }
210       ],
211       "returns" : [
212         {
213           "name" : "",
214           "type" : "HTMLElement/Roo.Element",
215           "desc" : "The new node or Element"
216         }
217       ]
218     },
219     {
220       "name" : "applyTemplate",
221       "desc" : "Returns an HTML fragment of this template with the specified values applied.",
222       "isStatic" : false,
223       "isConstructor" : false,
224       "isPrivate" : false,
225       "memberOf" : "Roo.Template",
226       "example" : "",
227       "deprecated" : "",
228       "since" : "",
229       "see" : "",
230       "params" : [
231         {
232           "name" : "values",
233           "type" : "Object",
234           "desc" : "The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})",
235           "isOptional" : false
236         }
237       ],
238       "returns" : [
239         {
240           "name" : "",
241           "type" : "String",
242           "desc" : "The HTML fragment"
243         }
244       ]
245     },
246     {
247       "name" : "set",
248       "desc" : "Sets the HTML used as the template and optionally compiles it.",
249       "isStatic" : false,
250       "isConstructor" : false,
251       "isPrivate" : false,
252       "memberOf" : "Roo.Template",
253       "example" : "",
254       "deprecated" : "",
255       "since" : "",
256       "see" : "",
257       "params" : [
258         {
259           "name" : "html",
260           "type" : "String",
261           "desc" : "",
262           "isOptional" : false
263         },
264         {
265           "name" : "compile",
266           "type" : "Boolean",
267           "desc" : "(optional) True to compile the template (defaults to undefined)",
268           "isOptional" : false
269         }
270       ],
271       "returns" : [
272         {
273           "name" : "",
274           "type" : "Roo.Template",
275           "desc" : "this"
276         }
277       ]
278     },
279     {
280       "name" : "from",
281       "desc" : "Creates a template from the passed element's value (<i>display:none</i> textarea, preferred) or innerHTML.",
282       "isStatic" : true,
283       "isConstructor" : false,
284       "isPrivate" : false,
285       "memberOf" : "Roo.Template",
286       "example" : "",
287       "deprecated" : "",
288       "since" : "",
289       "see" : "",
290       "params" : [
291         {
292           "name" : "el",
293           "type" : "String/HTMLElement",
294           "desc" : "A DOM element or its id",
295           "isOptional" : false
296         }
297       ],
298       "returns" : []
299     },
300     {
301       "name" : "insertAfter",
302       "desc" : "Applies the supplied values to the template and inserts the new node(s) after el.",
303       "isStatic" : false,
304       "isConstructor" : false,
305       "isPrivate" : false,
306       "memberOf" : "Roo.Template",
307       "example" : "",
308       "deprecated" : "",
309       "since" : "",
310       "see" : "",
311       "params" : [
312         {
313           "name" : "el",
314           "type" : "String/HTMLElement/Roo.Element",
315           "desc" : "The context element",
316           "isOptional" : false
317         },
318         {
319           "name" : "values",
320           "type" : "Object",
321           "desc" : "The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})",
322           "isOptional" : false
323         },
324         {
325           "name" : "returnElement",
326           "type" : "Boolean",
327           "desc" : "(optional) true to return a Roo.Element (defaults to undefined)",
328           "isOptional" : false
329         }
330       ],
331       "returns" : [
332         {
333           "name" : "",
334           "type" : "HTMLElement/Roo.Element",
335           "desc" : "The new node or Element"
336         }
337       ]
338     },
339     {
340       "name" : "append",
341       "desc" : "Applies the supplied values to the template and appends the new node(s) to el.",
342       "isStatic" : false,
343       "isConstructor" : false,
344       "isPrivate" : false,
345       "memberOf" : "Roo.Template",
346       "example" : "",
347       "deprecated" : "",
348       "since" : "",
349       "see" : "",
350       "params" : [
351         {
352           "name" : "el",
353           "type" : "String/HTMLElement/Roo.Element",
354           "desc" : "The context element",
355           "isOptional" : false
356         },
357         {
358           "name" : "values",
359           "type" : "Object",
360           "desc" : "The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})",
361           "isOptional" : false
362         },
363         {
364           "name" : "returnElement",
365           "type" : "Boolean",
366           "desc" : "(optional) true to return a Roo.Element (defaults to undefined)",
367           "isOptional" : false
368         }
369       ],
370       "returns" : [
371         {
372           "name" : "",
373           "type" : "HTMLElement/Roo.Element",
374           "desc" : "The new node or Element"
375         }
376       ]
377     },
378     {
379       "name" : "apply",
380       "desc" : "Alias for {@link #applyTemplate}",
381       "isStatic" : false,
382       "isConstructor" : false,
383       "isPrivate" : false,
384       "memberOf" : "Roo.Template",
385       "example" : "",
386       "deprecated" : "",
387       "since" : "",
388       "see" : "",
389       "params" : [],
390       "returns" : []
391     }
392   ],
393   "events" : []
394 }