How to change xml binding at runtime in Dashcode (iPhone)

353 views Asked by At

I am working 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

1

There are 1 answers

0
Rohit Arora On

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.. :)