:: Forum >>

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
Monday, January 26, 2009
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
Wednesday, January 28, 2009
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
Friday, January 30, 2009

This topic is archived.


Back to support forum

Forum search