I’m having trouble displaying new data in lists that are within a multiview. I am building a iphone application with phonegap.
The data is in json format and is created by extracting from a local sqlite db and building in a javascript variable. Some data is also being downloaded from a server where I have no control over the format and thus have to reformat it locally to get it to display in the lists.
I can get the data to load initially, when the app starts, however if the data changes or new data downloads, I cannot get the lists to update. The only method I have used successfully is to reload the view with another one that is the same but has a different name:
eg: dhx.ui(list2, $$(“approot”),“list”);
This does loads ok but the view now has a different name and thus instructions to the original view do not work against it.
The data flow is like so:
- json data down loads and is transformed and placed in to js variable
- call dhx.ui(list2, $$(“approot”),“list”); to display it.
- The relevant item in the list is clicked and this selection makes a call to the server and gets more json
- The new json is transformed and and placed in a JS variable eg var newlist =[{…]]
- the list newlist var data need to be loaded into another list. - have only achieved an updated view by using the dhx.ui method above.
So how do you:
A. make a list in a multiview update its content without having to use the dhx.ui method?
B. get the selection from one list to update the display of data in another another list?
Any help in this would be greatly appreciated
Sam