I've created a form which passes a query to a server and returns json data back. I build rows using some of that data. So far so good. I am stuck on how I allow a user to select a row to get more detail on the selected item. The touch event would basically make another call passing and id and get the detail info back and display it.
Can someone help me a little on how to pass that id with the row to another page that will show the detail? I don't know how to reference the row and pass the id for that row.
Here's what I have for the listener (its not correct for sure):
table.addEventListener('click', function(e) { var detail = Titanium.UI.createWindow({ title:e.rowData.nameLabel, url:'detail.js' }); detail.ID = 10004; Titanium.UI.currentTab.open(detail,{animated:true}); });
1 Answer
Accepted Answer
Hi Mike,
just put below line in your row creation code before push row into array.
row.obj = provider;and add below code in your table click event.
detail.obj = e.row.obj;and put alert in your detail.js file like below if your window name is not win then just replace with win in alert.
alert(JSON.stringify(win.obj));
Your Answer
Think you can help? Login to answer this question!