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 component(s) and/or code on this page is not supported. To develop custom apps within our current environments, please see App SDK 2.0 documentation.
The Link component provides an easy way to link to the detail page of an item. The underlying functionality to display the detail page is provided by the Navigation utility.

Link includes the following topics:
Create a Link
First include the App SDK JavaScript:
<script type="text/javascript" src="/apps/[version]/sdk.js"></script>
Instantiate a new Link:
var link = new rally.sdk.ui.basic.Link(config);
The parameters for rally.sdk.ui.basic.Link are as follows:
Parameter |
Description |
Example |
---|
config* |
A configuration object |
{ item: { "_ref":
"https://rally1.rallydev.com/slm/webservice/1.26/
defect/12345",
"FormattedID": "S200" } } |
* = required parameter
The Link configuration object supports the following properties:
Parameter |
Description |
---|
item* |
The item to be linked, may be a ref or a CA Agile Central object |
text |
The text of the link
(default = the item's formatted ID)
* Required if item is a ref |
* = required parameter
Display a Link
Once created, use the display method to display the link:
link.display(domElement);
Parameter |
Description |
Example |
---|
domElement* |
The element in which to display the drop-down, may be either an element or an element ID. |
"element1", document.getElementById("element1") |
* = required parameter
Public Methods
Method Name |
Parameters |
Description |
Example |
---|
display |
element* |
See above |
link.display("div1"); |
destroy |
- |
Removes this component |
link.destroy(); |
getComponentValue |
- |
Gets the OID of the specified item; provides a consistent interface for retrieving the value of basic components |
var value = link.getComponentValue(); |
* = Required parameter
Example
Copy and paste the following into a CA Agile Central custom app page.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!-- Copyright (c) 2010 CA Agile Central Software Development Corp. All rights reserved -->
<html>
<head>
<title>Link Example</title>
<meta name="Name" content="Component Example: Link" />
<meta name="Version" content="2010.4" />
<meta name="Vendor" content="CA Agile Central Software" />
<script type="text/javascript" src="/apps/1.26/sdk.js"></script>
<script type="text/javascript">
function onLoad() {
var item = {
FormattedID: "S52",
"_ref":
"https://preview.rallydev.com/slm/webservice/
1.26/hierarchicalrequirement/945607.js",
ObjectID:945607
};
var config = {
item: item
};
var linksDiv = document.getElementById("links");
var link = new rally.sdk.ui.basic.Link(config);
link.display(linksDiv);
}
rally.addOnLoad(onLoad);
</script>
</head>
<body>
<div id="links"></div>
</body>
</html>