1

这是从 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错误。

4

1 回答 1

0

Rally 没有定义,因为它应该是rc1,而不是rc,如您的代码所示。

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

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

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

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

于 2013-10-29T15:17:43.137 回答