开发者

Problem in Titanium Developer(Appcelerator): Passing the values to another window

I have a problem in titanium developer, when s开发者_开发百科ending the values from one window to other. I tried as like in the documentation of the appcelarator but i cant make it.

Ex:

//create tableView event listener
tableView.addEventListener('click', function(e)
{
    //set properties for passed info
    var newWin = Titanium.UI.createWindow({
        title:e.row.name,
        url:'customerDetail.js',
        passedName:e.row.name,
        passedID:e.row.id
        });

    newWin.open({animated:true, modal:true});
});

//In next window

var custName = win.passedName;

I want to send the values from one window to other. Something like using bundle in android. Please help me out from this. im new to titanium developer.


Try setting the properties on the window after it's created:

var newWin = Titanium.UI.createWindow({
    title:e.row.name,
    url:'customerDetail.js'
});

newWin.passedName = e.row.name;
newWin.passedID = e.row.id;

newWin.open({animated:true, modal:true});


At the top of that file I assume you have

var win = Titanium.UI.currentWindow;

before starting to use win. ?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜