Displaying Web Content within a Work Item Form: WebpageControlOptions Elements

[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

You can display content defined for a Web page or within a CDATA tag on a work item form by using the WebpageControlOptions element.

Schema Hierarchy

WITD Element (Work Item Type Definition Schema)

   WORKITEMTYPE Element (Work Item Type Definition Schema)

      FORM Element (Work Item Type Definition Schema)

         LAYOUT Element (Work Item Type Definition Schema)

         GROUP Element (Work Item Type Definition Schema)

         COLUMN Element (Work Item Type Definition Schema)

         TAB Element (Work Item Type Definition Schema)

            CONTROL Element (Work Item Type Definition Schema)


<xs:element name="WebpageControlOptions" type="WebpageControlOptionsType" minOccurs="0" maxOccurs="1" />
<xs:element name="Link" type="HyperLinkType" minOccurs="0" maxOccurs="1" />
<xs:element name="Param" type="HyperLinkParamType" minOccurs="0" maxOccurs="unbounded"/>

<WebpageControlOptions AllowScript="true | false" ReloadOnParamChange="true | false" >
   <Link URLRoot="URL root" URLPath ="URL path with parameters">
      <Param index="index value " value="Param Value " type ="Original | Current"/>
   </Link>
   <Content>
      <![CDATA[Contents of HTML]]>
   </Content>
</WebpageControlOptions>

The following sections describe attributes, child elements, and parent elements.

Child Elements and Attributes

Element

Attribute

Description

WebpageControlOptions

 

Optional Control element when type="WebpageControl".

Container element for defining a URL whose contents will be rendered in the work item form.

Optional Link element. Required when URLPath is specified.

Specifies a value to be used to determine the URL of the hyperlink when URLPath is specified.

The element type is complex type: WebpageControlOptionsType.

 

AllowScript

Optional WebPageControlOptions attribute.

Specifies whether JavaScript within the Web page is allowed to run (true) or not (false). The attribute type is xs:boolean.

All other settings such as ActiveX are based on the Internet Explorer settings defined for the client.

 

ReloadOnParamChange

Optional WebPageControlOptions attribute.

Specifies whether to reload (true) the contents of the Web page when a parameter in the work item form is changed (true) or not (false). The attribute type is xs:boolean.

The default value is true.

Link

 

Optional WebpageControlOptions element. This element is mutually exclusive with the Content element.

Specifies the URL for the Web page to be rendered in the work item form.

For more information, see Specifying a Hyperlink for a Field, Text, or Web Page: Link and Param Elements.

Content

 

Optional WebpageControlOptions element.

This element is mutually exclusive with the Link element.

Specifies the HTML content that is to be rendered by the Web page control. The content is specified within a CDATA tag. For example:

<![CDATA[Click here for detailed <b><a href="http://www.microsoft.com">Process Guidance</a></b>]]>

The element type is xs:string.

NoteNote
The HTML content is not validated prior to rendering it in the work item form.

Parent Elements

Element

Description

CONTROL Element (Work Item Type Definition Schema)

Required element.

Defines a field, text, hyperlink, or other control element to appear on the work item form.

Text

Optional LabelText element.

Container element for the information or label to appear on the work item form.

For more information, see Adding Standalone Labels to a Work Item Form: LabelText and Text Elements.

The Link and Content elements are mutually exclusive.

The AllowScript and ReloadOnParamChange attributes are not allowed when you use the Content element.

When the Web page control is configured to display raw HTML, all scripting is disabled. Any hyperlinks in the content that are clicked are opened in the Visual Studio Web browser if the work item form is shown in Visual Studio or in Internet Explorer.

Several toolbar buttons are added to the work item form for a tab that contains WebpageControl. These options include the following functions:

  • Back and forward navigation

  • Stop content loading and refresh content

  • Return to content home page

  • Open the content in a new window or in an external browser

In addition, if the Web page to be loaded contains untrusted content, then the icon is blocked and the blocked icon appears.

The WebpageControlOptions element is only recognized by clients that are running the latest version of Team Explorer. For previous versions, a red area is displayed and a message appears indicating that the control could not be found.

The following example shows how to load a work item form with HTML defined in a CDATA tag.

<Control Type="WebPageControl">
   <WebPageControlOptions>
      <Content>
         <![CDATA[Click here for detailed <b><a href="http://www.microsoft.com">Process Guidance</a></b>]]>
      </Content>
   </WebPageControlOptions>
</Control>

WebpageControlOptionsType

<xs:complexType name="WebpageControlOptionsType">
   <xs:choice minOccurs="1" maxOccurs="1">
      <xs:element name="Link" type="HyperLinkType"/>
      <xs:element name="Content" type="xs:string"/>
   </xs:choice>
      <xs:attribute name="AllowScript" type="xs:boolean" use="optional" />
      <xs:attribute name="ReloadOnParamChange" type="xs:boolean" use="optional" />
</xs:complexType>

NonBlankString

<xs:simpleType name="NonBlankString">
   <xs:restriction  base="xs:string">
   <xs:pattern value=".*\S+.*"/>
   </xs:restriction>
</xs:simpleType>

Namespace

http://schemas.microsoft.com/VisualStudio/2008/workitemtracking/typedef

Schema Name

Work Item Type Definition

Validation File

WorkItemTypeDefinition.xsd

Element Type

WebpageControlOptionsType

Can Be Empty

Not applicable

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft