Defects by State Example

Deprecation Warning! The content below is only applicable for use within deprecated 1.x versions of CA Agile Central's App SDK. Use of the components and code on this page is not supported. To develop custom apps within our current environments, please see App SDK 2.1 documentation.

This example demonstrates the integration of multiple components to create a basic app. A table displays defects filtered using a drop-down. This example also demonstrates a table querying for its own data and rendering basic components in its cells.

defects by state

Example Code

Copy and paste the following into a CA Agile Central custom page to see it in action!

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "">
<!-- Copyright (c) 2010 CA Agile Central Software Development Corp. All rights reserved -->
   <title>Defects By State</title>
   <meta name="Name" content="App Example: Defects by State" />
   <meta name="Version" content="2011.04.02" />
   <meta name="Vendor" content="CA Agile Central Software" />

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

     var rallyDataSource;
     var table;

     function onSelectionChanged(sender, eventArgs) {

      if(table) {

      var tableConfig = {
        columnKeys: ["FormattedIDLink", "Name", "Priority"],
         columnHeaders: ["Formatted ID", "Name", "Priority"],
         type: "defect",
         query: '(State = "' + eventArgs.value + '")',
        fetch: "Name,FormattedID,Priority"

      table = new rally.sdk.ui.Table(tableConfig, rallyDataSource);
      table.addEventListener(table.getValidEvents().onDataRetrieved, function(t, args) {
         rally.forEach(args.items, function(item) {
          //Create a link component
           item.FormattedIDLink = new rally.sdk.ui.basic.Link({item: item});

    function onLoad() {
       rallyDataSource = new Agile CentralDataSource('__WORKSPACE_OID__',
      var config = {
           type: "defect",
           attribute: "state",
          label: "State: ",
           showLabel: true

      var attributeDropdown = new rally.sdk.ui.AttributeDropdown(config, rallyDataSource);
       attributeDropdown.display("attrDropdown", onSelectionChanged);



   <div id="attrDropdown"></div>
   <div id="defects" style="width:500px; height: 400px; margin-top:15px"></div>


ヘルプをお求めですか?CA Agile Central コミュニティは、セルフサービスとサポートのワンストップ ショップです。CA Agile Central サポートにフィードバックを送信したり、答を見つけたり、他のユーザとのコラボレーションには CA Agile Central コミュニティ にご参加ください。