No data
Alex,
I propose the following change to allow for an easy way to display a "No data was found" message (this was inspired by your "message" template which works great by the way):
1) In Grid.js, add the following inside the "Active.Controls.Grid.create" function:
obj.defineTemplate("nodata", new Active.HTML.DIV);
2) In list.js, replace the current "html" function with the following:
var html = function(){
var data = this.getDataModel();
if (!data.isReady()) {return this.getMessageTemplate()}
var i, result = [], temp = [], items = this.getItemsProperty("values");
if (items.length==0) {return this.getNodataTemplate()}
for(i=0; i<items.length; i++) {result[i] = this.getItemTemplate(items[i], temp).toString()}
return result.join("");
};
obj.setContent("html", html);
I propose the following change to allow for an easy way to display a "No data was found" message (this was inspired by your "message" template which works great by the way):
1) In Grid.js, add the following inside the "Active.Controls.Grid.create" function:
obj.defineTemplate("nodata", new Active.HTML.DIV);
2) In list.js, replace the current "html" function with the following:
var html = function(){
var data = this.getDataModel();
if (!data.isReady()) {return this.getMessageTemplate()}
var i, result = [], temp = [], items = this.getItemsProperty("values");
if (items.length==0) {return this.getNodataTemplate()}
for(i=0; i<items.length; i++) {result[i] = this.getItemTemplate(items[i], temp).toString()}
return result.join("");
};
obj.setContent("html", html);
Jeremie
April 2,