I am developing a mobile application using the Dojo Toolkit. I want to make a widget of the following:
<div data-dojo-type="dojox.mobile.ListItem" data-dojoprops="moveTo:'breakdown'">
<div>Maximum: Some value</div>
</div>
I want to be able to use the widget like this:
<div data-dojo-type="dojox.mobile.RoundRectList">
<div data-dojo-type="MyWidget" data-dojo-props="maximum:'1200'"></div>
</div>
And here is what I did so far:
require(
[ "dojo/_base/declare", "dojo/parser", "dojo/ready",
"dojox/mobile/ListItem", "dijit/_WidgetBase",
"dijit/_TemplatedMixin" ],
function(declare, parser, ready, ListItem, _WidgetBase, _TemplatedMixin) {
declare("MyWidget", [ ListItem, _WidgetBase, _TemplatedMixin ], {
templateString: "<div>"
+ "<div>Maximum: <span data-dojo-attach-point='maximumNode'></span></div>"
+ "</div>",
maximum : "unknown",
_setMaximumAttr : { node : "maximumNode", type : "innerHTML" },
buildRendering : function() {
this.inherited(arguments);
}
});
ready(function() {
parser.parse();
});
});
I get no error or somthing like that, the page is not loading. What is wrong with that code?