| 1 |
define([ |
| 2 |
"dojo/_base/declare", |
| 3 |
"dojo/_base/lang", |
| 4 |
"dijit/_WidgetBase", |
| 5 |
"dijit/_TemplatedMixin", |
| 6 |
"dijit/_WidgetsInTemplateMixin", |
| 7 |
"./at" |
| 8 |
], function(declare, lang, _WidgetBase, _TemplatedMixin, _WidgetsInTemplateMixin){ |
| 9 |
return declare("dojox.mvc.Templated", [_WidgetBase, _TemplatedMixin, _WidgetsInTemplateMixin], { |
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
bindings: null, |
| 16 |
|
| 17 |
startup: function(){ |
| 18 |
|
| 19 |
|
| 20 |
var bindings = lang.isFunction(this.bindings) && this.bindings.call(this) || this.bindings; |
| 21 |
for(var s in bindings){ |
| 22 |
var w = this[s], props = bindings[s]; |
| 23 |
if(w){ |
| 24 |
for(var prop in props){ |
| 25 |
w.set(prop, props[prop]); |
| 26 |
} |
| 27 |
}else{ |
| 28 |
console.warn("Widget with the following attach point was not found: " + s); |
| 29 |
} |
| 30 |
} |
| 31 |
this.inherited(arguments); |
| 32 |
} |
| 33 |
}); |
| 34 |
}); |