I hacked at the sample to create an example of an app that can pass events between two panels.
This is very unsupported at this time and we reserve the right to break it whenever we want without any warning.
话虽如此,您可以看到当前不受支持的获取应用程序ID的方式,如果您制作了此应用程序的两个副本,您可以在控制台中看到应用程序在全球拉力赛消息总线上通信的结果。
您可以找到它的要点此处
<!DOCTYPE html>
<html>
<head>
<title>My Custom App</title>
<!--Include SDK-->
<script type="text/javascript" src="/apps/2.0p/sdk.js"></script>
<!--App code-->
<script type="text/javascript">
Rally.onReady(function() {
Ext.define( CustomApp , {
extend: Rally.app.App ,
componentCls: app ,
mixins:[ Rally.Messageable ],
launch: function() {
var brokenInTheFutureIdThatWillWorkForNow = Ext.Object.fromQueryString(window.location.href);
window.parent.Rally.Messages.subscribe("test",function(){console.error(brokenInTheFutureIdThatWillWorkForNow.panelOid,arguments);});
window.parent.Rally.Messages.publish("test",brokenInTheFutureIdThatWillWorkForNow.panelOid);
//Write app code here
}
});
Rally.launchApp( CustomApp , {
name: My Custom App
});
});
</script>
<!--App styles-->
<style type="text/css">
.app {
/* Add app styles here */
}
</style>
</head>
<body class="myApp">
</body>
</html>