var btn = { xtype: 'tbbutton', text: apps[i].name, tooltip: apps[i].name, location : apps[i].location, handler: Application.openApplication, location: apps[i].location };
则在 openApplication 方法中,会自动得到一个对象参数,这个对象包含属性 location,及其对应的属性值。如:
openApplication: function(o){ var url = 'http://' + host + ':' + port + o.location + '?sso=http://' + host + ':' + port; open(url, '_blank'); }