Any help is greatly appreciated.
enyo.kind({
name: "ListUsers",
kind: "FittableColumns",
fit: true,
classes: "enyo-fit",
published: {
collection: null
},
components:[
{kind: "FittableRows", components: [
{name: "repeater", kind:"enyo.DataList", fit:true, components: [
{components: [
{name:"firstName"}
], bindings: [
{from: ".model.firstName", to: ".$.firstName.content"}
]}
]}
]}
],
bindings: [
{from: ".collection", to: ".$.repeater.collection"}
],
users : '',
create: enyo.inherit(function (sup) {
return function () {
sup.apply(this, arguments);
this.getUsers();
};
}),
getUsers: function(inSender,inEvent) {
var request = new enyo.Ajax({
url: "http://atxapps.com/_sites/atxapps.com/dev/jetstream/assets/dataUsers.json",
method: "GET",
handleAs: "json"
});
request.response(this,"processUsers");
request.go();
},
processUsers: function(inSender, inResponse){
if (!inResponse) {
return;
}
this.set("collection", inResponse.users);
}
});
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
collection
to be an instance of enyo.Collection, i.e. in your processUsers method: