Partial Fix #5654 - roojspacker - get it working as a doc tool...
[roojs1] / docs2 / symbols / Roo.Template.json
1 {
2   "name" : "Roo.Template",
3   "augments" : [
4   ],
5   "desc" : "Represents an HTML fragment template. Templates can be precompiled for greater performance.\nFor a list of available format functions, see {@link Roo.util.Format}.<br />\nUsage:\n<pre><code>\nvar t = new Roo.Template({\n    html :  '&lt;div name=\"{id}\"&gt;' + \n        '&lt;span class=\"{cls}\"&gt;{name:trim} {someval:this.myformat}{value:ellipsis(10)}&lt;/span&gt;' +\n        '&lt;/div&gt;',\n    myformat: function (value, allValues) {\n        return 'XX' + value;\n    }\n});\nt.append('some-element', {id: 'myid', cls: 'myclass', name: 'foo', value: 'bar'});\n</code></pre>\nFor more information see this blog post with examples:\n <a href=\"http://www.cnitblog.com/seeyeah/archive/2011/12/30/38728.html/\">DomHelper\n     - Create Elements using DOM, HTML fragments and Templates</a>.",
6   "isSingleton" : false,
7   "isStatic" : true,
8   "isBuiltin" : false,
9   "config" : [
10     {
11       "name" : "html",
12       "type" : "String",
13       "desc" : "The HTML fragment or an array of fragments to join(\"\") or multiple arguments to join(\"\")",
14       "memberOf" : "Roo.Template",
15       "values" : [
16       ]
17     },
18     {
19       "name" : "url",
20       "type" : "String",
21       "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...",
22       "memberOf" : "Roo.Template",
23       "values" : [
24       ]
25     }
26   ],
27   "methods" : [
28     {
29       "name" : "insertFirst",
30       "desc" : "Applies the supplied values to the template and inserts the new node(s) as the first child of el.",
31       "isStatic" : false,
32       "isConstructor" : false,
33       "isPrivate" : false,
34       "memberOf" : "Roo.Template",
35       "example" : "",
36       "deprecated" : "",
37       "since" : "",
38       "see" : "",
39       "params" : [
40         {
41           "name" : "el",
42           "type" : "String/HTMLElement/Roo.Element",
43           "desc" : "The context element",
44           "isOptional" : false
45         },
46         {
47           "name" : "values",
48           "type" : "Object",
49           "desc" : "The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})",
50           "isOptional" : false
51         },
52         {
53           "name" : "returnElement",
54           "type" : "Boolean",
55           "desc" : "(optional) true to return a Roo.Element (defaults to undefined)",
56           "isOptional" : false
57         }
58       ],
59       "returns" : [
60         {
61           "name" : "",
62           "type" : "HTMLElement/Roo.Element",
63           "desc" : "The new node or Element"
64         }
65       ]
66     },
67     {
68       "name" : "overwrite",
69       "desc" : "Applies the supplied values to the template and overwrites the content of el with the new node(s).",
70       "isStatic" : false,
71       "isConstructor" : false,
72       "isPrivate" : false,
73       "memberOf" : "Roo.Template",
74       "example" : "",
75       "deprecated" : "",
76       "since" : "",
77       "see" : "",
78       "params" : [
79         {
80           "name" : "el",
81           "type" : "String/HTMLElement/Roo.Element",
82           "desc" : "The context element",
83           "isOptional" : false
84         },
85         {
86           "name" : "values",
87           "type" : "Object",
88           "desc" : "The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})",
89           "isOptional" : false
90         },
91         {
92           "name" : "returnElement",
93           "type" : "Boolean",
94           "desc" : "(optional) true to return a Roo.Element (defaults to undefined)",
95           "isOptional" : false
96         }
97       ],
98       "returns" : [
99         {
100           "name" : "",
101           "type" : "HTMLElement/Roo.Element",
102           "desc" : "The new node or Element"
103         }
104       ]
105     },
106     {
107       "name" : "insertBefore",
108       "desc" : "Applies the supplied values to the template and inserts the new node(s) before el.",
109       "isStatic" : false,
110       "isConstructor" : false,
111       "isPrivate" : false,
112       "memberOf" : "Roo.Template",
113       "example" : "",
114       "deprecated" : "",
115       "since" : "",
116       "see" : "",
117       "params" : [
118         {
119           "name" : "el",
120           "type" : "String/HTMLElement/Roo.Element",
121           "desc" : "The context element",
122           "isOptional" : false
123         },
124         {
125           "name" : "values",
126           "type" : "Object",
127           "desc" : "The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})",
128           "isOptional" : false
129         },
130         {
131           "name" : "returnElement",
132           "type" : "Boolean",
133           "desc" : "(optional) true to return a Roo.Element (defaults to undefined)",
134           "isOptional" : false
135         }
136       ],
137       "returns" : [
138         {
139           "name" : "",
140           "type" : "HTMLElement/Roo.Element",
141           "desc" : "The new node or Element"
142         }
143       ]
144     },
145     {
146       "name" : "applyTemplate",
147       "desc" : "Returns an HTML fragment of this template with the specified values applied.",
148       "isStatic" : false,
149       "isConstructor" : false,
150       "isPrivate" : false,
151       "memberOf" : "Roo.Template",
152       "example" : "",
153       "deprecated" : "",
154       "since" : "",
155       "see" : "",
156       "params" : [
157         {
158           "name" : "values",
159           "type" : "Object",
160           "desc" : "The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})",
161           "isOptional" : false
162         }
163       ],
164       "returns" : [
165         {
166           "name" : "",
167           "type" : "String",
168           "desc" : "The HTML fragment"
169         }
170       ]
171     },
172     {
173       "name" : "compile",
174       "desc" : "Compiles the template into an internal function, eliminating the RegEx overhead.",
175       "isStatic" : false,
176       "isConstructor" : false,
177       "isPrivate" : false,
178       "memberOf" : "Roo.Template",
179       "example" : "",
180       "deprecated" : "",
181       "since" : "",
182       "see" : "",
183       "params" : [
184       ],
185       "returns" : [
186         {
187           "name" : "",
188           "type" : "Roo.Template",
189           "desc" : "this"
190         }
191       ]
192     },
193     {
194       "name" : "set",
195       "desc" : "Sets the HTML used as the template and optionally compiles it.",
196       "isStatic" : false,
197       "isConstructor" : false,
198       "isPrivate" : false,
199       "memberOf" : "Roo.Template",
200       "example" : "",
201       "deprecated" : "",
202       "since" : "",
203       "see" : "",
204       "params" : [
205         {
206           "name" : "html",
207           "type" : "String",
208           "desc" : "",
209           "isOptional" : false
210         },
211         {
212           "name" : "compile",
213           "type" : "Boolean",
214           "desc" : "(optional) True to compile the template (defaults to undefined)",
215           "isOptional" : false
216         }
217       ],
218       "returns" : [
219         {
220           "name" : "",
221           "type" : "Roo.Template",
222           "desc" : "this"
223         }
224       ]
225     },
226     {
227       "name" : "from",
228       "desc" : "Creates a template from the passed element's value (<i>display:none</i> textarea, preferred) or innerHTML.",
229       "isStatic" : true,
230       "isConstructor" : false,
231       "isPrivate" : false,
232       "memberOf" : "Roo.Template",
233       "example" : "",
234       "deprecated" : "",
235       "since" : "",
236       "see" : "",
237       "params" : [
238         {
239           "name" : "el",
240           "type" : "String/HTMLElement",
241           "desc" : "A DOM element or its id",
242           "isOptional" : false
243         }
244       ],
245       "returns" : [
246       ]
247     },
248     {
249       "name" : "insertAfter",
250       "desc" : "Applies the supplied values to the template and inserts the new node(s) after el.",
251       "isStatic" : false,
252       "isConstructor" : false,
253       "isPrivate" : false,
254       "memberOf" : "Roo.Template",
255       "example" : "",
256       "deprecated" : "",
257       "since" : "",
258       "see" : "",
259       "params" : [
260         {
261           "name" : "el",
262           "type" : "String/HTMLElement/Roo.Element",
263           "desc" : "The context element",
264           "isOptional" : false
265         },
266         {
267           "name" : "values",
268           "type" : "Object",
269           "desc" : "The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})",
270           "isOptional" : false
271         },
272         {
273           "name" : "returnElement",
274           "type" : "Boolean",
275           "desc" : "(optional) true to return a Roo.Element (defaults to undefined)",
276           "isOptional" : false
277         }
278       ],
279       "returns" : [
280         {
281           "name" : "",
282           "type" : "HTMLElement/Roo.Element",
283           "desc" : "The new node or Element"
284         }
285       ]
286     },
287     {
288       "name" : "append",
289       "desc" : "Applies the supplied values to the template and appends the new node(s) to el.",
290       "isStatic" : false,
291       "isConstructor" : false,
292       "isPrivate" : false,
293       "memberOf" : "Roo.Template",
294       "example" : "",
295       "deprecated" : "",
296       "since" : "",
297       "see" : "",
298       "params" : [
299         {
300           "name" : "el",
301           "type" : "String/HTMLElement/Roo.Element",
302           "desc" : "The context element",
303           "isOptional" : false
304         },
305         {
306           "name" : "values",
307           "type" : "Object",
308           "desc" : "The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})",
309           "isOptional" : false
310         },
311         {
312           "name" : "returnElement",
313           "type" : "Boolean",
314           "desc" : "(optional) true to return a Roo.Element (defaults to undefined)",
315           "isOptional" : false
316         }
317       ],
318       "returns" : [
319         {
320           "name" : "",
321           "type" : "HTMLElement/Roo.Element",
322           "desc" : "The new node or Element"
323         }
324       ]
325     },
326     {
327       "name" : "apply",
328       "desc" : "Alias for {@link #applyTemplate}",
329       "isStatic" : false,
330       "isConstructor" : false,
331       "isPrivate" : false,
332       "memberOf" : "Roo.Template",
333       "example" : "",
334       "deprecated" : "",
335       "since" : "",
336       "see" : "",
337       "params" : [
338       ],
339       "returns" : [
340       ]
341     }
342   ],
343   "events" : [
344   ]
345 }