| 1 |
define([ |
| 2 |
"dojo/_base/declare", |
| 3 |
"dojox/mvc/Templated", |
| 4 |
"dijit/registry", |
| 5 |
"dojo/text!./test_mvc_widget_template2.html", |
| 6 |
"dojox/mvc/at", |
| 7 |
"dijit/form/TextBox", |
| 8 |
"dijit/form/Button", |
| 9 |
"dojox/mvc/Group", |
| 10 |
"dojox/mvc/Output", |
| 11 |
"dojox/mvc/Repeat" |
| 12 |
], function(declare, Templated, registry, template, at){ |
| 13 |
return dojo.declare("dojox.mvc.tests.test_templatedWidgetList.myMvcTemplated", [Templated], { |
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
ctrl: null, |
| 24 |
|
| 25 |
templateString: template, |
| 26 |
|
| 27 |
startup: function(){ |
| 28 |
console.log("startup called in myMvcTemplated2!!! "); |
| 29 |
this.labelNode.set("value", at("rel:", "Serial")); |
| 30 |
this.inputNode.set("value", at("rel:", "First")); |
| 31 |
|
| 32 |
this.inherited("startup", arguments); |
| 33 |
}, |
| 34 |
|
| 35 |
buildRendering: function(){ |
| 36 |
console.log("call myMvcTemplated2 buildRendering"); |
| 37 |
window.at = at; |
| 38 |
this.inherited(arguments); |
| 39 |
}, |
| 40 |
|
| 41 |
showDetails: function(){ |
| 42 |
|
| 43 |
|
| 44 |
var index = this.indexAtStartup; |
| 45 |
console.log("Called myMvcTemplated2 showDetails selected index="+index); |
| 46 |
this.ctrl.set("cursorIndex", index); |
| 47 |
}, |
| 48 |
|
| 49 |
getParent: function(){ |
| 50 |
console.log("Call myMvcTemplated2 getParent"); |
| 51 |
return null; |
| 52 |
} |
| 53 |
}); |
| 54 |
}); |