I am working 开发者_JAVA技巧on Dashcode (iphone). I get xml data from a url and need to change or refresh xml binding to a list at runtime. In apple website, there is a way shown to bind xml/Json data only at design time.
Any one knows how to do it ?
Thanks
I found solution for this. Kinda tricky and easy.
//-First get dataSource which is used for binding.
// then change URl property.
var ds = dashcode.getDataSource('dataSource');
ds.url = 'http://192.168.10.14/mysite/sample2.xml';
//-Reload that list which is binded to dataSource.
var list = document.getElementById('resultList');
list.object.reloadData();
Its done.. :)
精彩评论