The base-class for DTL-templated widgets.
Parameter | Type | Description |
---|---|---|
params | Object | null | Hash of initialization parameters for widget, including scalar values (like title, duration etc.) and functions, typically callbacks like onClick. The hash can contain any of the widget's properties, excluding read-only properties. |
srcNodeRef | DOMNode | String |
Optional If a srcNodeRef (DOM node) is specified, replace srcNodeRef with my generated DOM tree. |
See the dojox/dtl/_Templated reference documentation for more information.
List of connections associated with data-dojo-attach-event=... in the template
List of widget attribute names associated with data-dojo-attach-point=... in the template, ex: ["containerNode", "labelNode"]
Not normally use, but this flag can be set by the app if the server has already rendered the template, i.e. already inlining the template for the widget into the main page. Reduces _TemplatedMixin to just function like _AttachMixin.
Object to which attach points and events will be scoped. Defaults to 'this'.
Path to template (HTML file) for this widget relative to dojo.baseUrl. Deprecated: use templateString with require([... "dojo/text!..."], ...) instead
A string that represents the widget template. Use in conjunction with dojo.cache() to load from a file.
Roughly corresponding to dojo/on, this is the default function for processing a data-dojo-attach-event. Meant to attach to DOMNodes, not to widgets.
Parameter | Type | Description |
---|---|---|
node | DOMNode | The node to setup a listener on. |
type | String | Event name like "click". |
func | undefined |
Iterate through the dom nodes and attach functions and nodes accordingly.
Map widget properties and functions to the handlers specified in the dom node and it's descendants. This function iterates over all nodes and looks for these properties:
Parameter | Type | Description |
---|---|---|
rootNode | DomNode | The node to search for properties. All descendants will be searched. |
Detach and clean up the attachments made in _attachtempalteNodes.
Escape a value to be inserted into the template, either into an attribute value (ex: foo="${bar}") or as inner text of an element (ex: ${foo})
Parameter | Type | Description |
---|---|---|
val | String |
Relocate source contents to templated container node. this.containerNode must be able to receive children, or exceptions will be thrown.
Parameter | Type | Description |
---|---|---|
source | DomNode |
Parameter | Type | Description |
---|---|---|
baseNode | DOMNode | Widget | |
getAttrFunc | undefined | |
attachFunc | undefined |
Does substitution of ${foo} type properties in template string
Parameter | Type | Description |
---|---|---|
tmpl | undefined |
Layer for dijit._Templated.getCachedTemplate
Parameter | Type | Description |
---|---|---|
templatePath | undefined | |
templateString | undefined | |
alwaysUseString | undefined |