Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- dojo.provide("website.widget.Repeater")
- dojo.require("dojox.dtl._Templated");
- dojo.require("dijit._Widget");
- dojo.declare("website.widget.Repeater", [dijit._Widget, dojox.dtl._Templated], {
- _dijitTemplateCompat: true,
- store: null,
- templatePath: null,
- items: null,
- postCreate: function()
- {
- //console.debug(store);
- dojo.addClass(this.domNode, 'dataLess');
- this.store.fetch(
- {
- query: {name: "*"},
- onComplete: dojo.hitch(this, function(items){this.showData(items);}),
- onError: function(error, request) {alert(error + "\n" + request);}
- }
- );
- },
- showData: function(items)
- {
- alert(this.items.length);
- this.items = items;
- for (item in this.items)
- alert(item.name);
- this.render();
- dojo.removeClass(this.domNode,'dataLess');
- }
- });
Add Comment
Please, Sign In to add comment