3.2.0

AW.UI.List & setItemModel

I am trying to load data in a AW.XML.Table object and display the data in a AW.UI.List. I've done this before using a grid, but never a list. I found this thread from 2007:
http://www.activewidgets.com/javascript.forum.19797.1/can-i-use-setcellmodel-with.html

It is suggested to modify the datasource object to work with a single index. Can anyone provide me an example of this.

Thanks
AT
January 26,
Why don't you just use the XML table getCount() and getData() methods and pass their output to the corresponding list methods setItemCount() and setItemText() or setItemValue()?
Anthony
January 28,
Anthony,

Gave it a try and I think I got it to work. If there is a better solution please let me know and post some examples.
var array =  new Array();
var defaultResponse = table.response;   
table.response = function(xml){  
    defaultResponse.call(this, xml);  

    list.setItemCount(this.getCount());
    for (i=0;i<this.getCount();i++) {
        array[i] = this.getData(0,i);
    }
    list.refresh();	
}


Thanks.
AT
January 30,

This topic is archived.

See also:


Back to support forum