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