:: Forum >>
How do template display model data
Can some one help explain how active widgets templates display data ?
I cant see how the template actually references the data stored in models ?
For example : in AW.UI.LIST
template are defined for the control :
obj.defineTemplate("content", new AW.Templates.List);
obj.defineTemplate("item", new AW.Templates.ImageText);
And in AW.TEMPLATES.LIST the list of items is iterated over and the ImageText template called.
for(i=0; i<count; i++){
ii = indices ? indices[i+offset] : i+offset;
a[i] = this.getItemTemplate(ii).toString();
}
How does the ItemTemplate know to reference which element in the model array ?
Yasdnil
Saturday, February 25, 2006
This topic is archived.
Back to support forum
Forum search