Rally 2.0 SDK示例无法加载

时间:2013-10-29 13:40:28

标签: extjs rally

这是来自Rally SDK网站示例中生成的App-uncompressed.html文件:当我将此代码作为自定义HTMl应用程序复制并粘贴到Rally中时,它不会加载任何内容。我只是得到一个空白的应用程序。

<!DOCTYPE html>
<html>
<head>
<title>newTeam</title>

<script type="text/javascript" src="/apps/2.0rc/sdk.js"></script>

<script type="text/javascript">
    Rally.onReady(function () {
            Ext.define('CustomApp', {
extend: 'Rally.app.App',
componentCls: 'app',

launch: function() {
    //Write app code here
 // The data store containing the list of states
var states = Ext.create('Ext.data.Store', {
fields: ['abbr', 'name'],
data : [
    {"abbr":"AL", "name":"Alabama"},
    {"abbr":"AK", "name":"Alaska"},
    {"abbr":"AZ", "name":"Arizona"}
    //...
]
});

// Create the combo box, attached to the states data store
Ext.create('Ext.form.ComboBox', {
fieldLabel: 'Choose State',
store: states,
queryMode: 'local',
displayField: 'name',
valueField: 'abbr',
renderTo: Ext.getBody()
});
 }
});


        Rally.launchApp('CustomApp', {
            name:"newTeam",
            parentRepos:""
        });

    });
</script>


<style type="text/css">
    .app {
 /* Add app styles here */
}

</style>
</head>
<body></body>
</html>

此外,我尝试在浏览器中运行调试文件,但出现Rally not defined错误。

1 个答案:

答案 0 :(得分:0)

未定义拉力赛,因为它应该是rc1,而不是rc,正如您的代码所示。

<script type="text/javascript" src="/apps/2.0rc1/sdk.js"></script>

您可以在浏览器中测试这些网址:

https://rally1.rallydev.com/apps/2.0rc1/sdk-debug.js

https://rally1.rallydev.com/apps/2.0rc1/sdk.js