Platform SDK: Exchange 2000 Server

Tree Behavior

[This is preliminary documentation and subject to change.]

The Exchange tree behavior provides a hierarchical visual display for data in a manner similar to the standard Microsoft® Windows® treeview behavior found in Windows Explorer or Microsoft® Outlook®. It provides the functionality for selecting, expand/collapse, and vertical grouping lines.

This example demonstrates inserting a tree behavior into a Web page and manipulating the tree view through scripting in response to events.

The pick folder function simply displays an alert message containing the folder URL. That URL can be used by other behaviors.

The OnAdd ierarchy function builds the hierarchy for the tree to display.

Note    Errors occur for the tree behavior if you open the Web page from the Microsoft® Windows® Explorer and not through the Web browser.

Inserting the tree behavior into a Web page.

javascript

<HTML>
<?XML:NAMESPACE PREFIX="WM"/>
<HEAD>
<SCRIPT  src="webclientlang.js"></SCRIPT>
<SCRIPT  src="webclientutil.js"></SCRIPT>
<STYLE>
  WM\:TreeView { behavior:url(ExchangeTree.htc) }
</STYLE>
<script>
var rgRenderPrivateURLS = new Array();   
var rgRenderPublicURLS = new Array();   
rgRenderPublicURLS[rgRenderPublicURLS.length] = "http://"+document.location.hostname+"/public/";
var iPrvCount = 0;
var iPubCount = 0;
function objTree_OnPickFolder(href)
{
     alert(href);
}
function objTree_OnAddHierarchy()
{
      if(iPrvCount == rgRenderPrivateURLS.length)
      {
           if(iPubCount == rgRenderPublicURLS.length)
           {
                return(false);
           }
      objTree.addPublicStore(rgRenderPublicURLS[iPubCount++], null);
      return;
     }
}
function window.onload()
{
     objTree.addPublicStore(rgRenderPublicURLS[iPubCount++], null);
}
</script>
</HEAD>
<BODY>
<H1>Tree View Test</H1>
<HR>
<WM:TreeView id="objTree" style=''
onpickfolder = "objTree_OnPickFolder(event.URL);"
onaddhierarchy = "objTree_OnAddHierarchy();"
imagePath = "/exchweb/img/"
/>
<P>
</BODY> </HTML>