2013-10-29 59 views
1

這是在拉力賽SDK網站的例子中產生的App-uncompressed.html文件:當我複製和粘貼內部拉力此代碼作爲自定義HTML應用程序,它不會加載任何東西。我剛收到一個空白的應用程序。拉力2.0 SDK示例不加載

<!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錯誤。

回答