| TREEGEN COMPONENT 4.01 |
| Tree
Object Last modified: April 9,1999 © 1999 Advantys. All rights reserved. |
The Name property contains the name of the tree.
Syntax
.NameReturn Values
Returns a String value.Example
<%
Response.Write("TreeName=" & MyTree.Name & "<br>")
%>
The Description property contains a global description of the tree.
Syntax
.DescriptionReturn Values
Returns a String value.Example
<%
Response.Write("Description=" & MyTree.Description & "<br>")
%>
The TreeType property contains the type of the tree (TREE, NEWS...).
Syntax
.TreeTypeReturn Values
Returns a String value which is the type of the tree.Example
<%
Response.Write("TreeType=" & MyTree.TreeType & "<br>")
%>
The DataSource property contains the current DataSource of the tree. The default DataSource is the "TEXT" value.
Syntax
.DataSourceReturn Values
Returns a String value which can be "TEXT" or "ODBC".Example
<%
Dim MyTree
Set MyTree = Server.CreateObject("TreeGen.Tree")
MyTree.DataSource = "ODBC"
%>
The Version property returns the current TreeGen version.
Syntax
.VersionReturn Values
Returns a String value.Example
<%
Response.Write("Version=" & MyTree.Version & "<br>")
%>
The Domain property specifies the Domain for the object.
Syntax
.DomainReturn Values
Returns a String value.Example
<%
for intI=1 to MyTree.ACL.Count
set MyTree = MyTree.ACL.ACE(inI)
Response.Write ("AccessMask=" & MyTree.AccessMask & "<br>")
Response.Write ("AceType=" & MyTree.AceType & "<br>")
Response.Write ("Domain=" & MyTree.Domain & "<br>")
Response.Write ("Trustee=" & MyTree.Trustee & "<br>")
next
%>
The RootItem property contains the root of the tree.
Syntax
.RootItemReturn Values
Returns a TreeGen Item object which is the root of the current tree.Example
<%Note : the loaditems function is automatically called if there is no loaded item when the root property is called.
Response.Write("RootItem=" & MyTree.RootItem.link.Text & "<br>")
%>
The PhysicalPath property contains the physical path of the description file of the tree.
Syntax
.PhysicalPathReturn Values
Returns a String value.Example
<%
MyTree.PhysicalPath = "c:\inetpub\intranet\scripts\treegen\trees\mytree.txt"
%>
The TextSeparator property contains the text separator for the current tree. This property is only available for a tree with a "TEXT" data source.
Syntax
.TextSeparatorReturn Values
Returns a String value.Example
<%
MyTree.TextSeparator = "<SEP>"
%>Note : the default value for the textSeparator property is ";".
The DateLastModified property contains the date of the last modification of the tree.
Syntax .DateLastModifiedReturn Values
Returns a Date value which is the date of last modification of the current tree.Example
<%
Response.Write("Last modification=" & MyTree.DateLastModified & "<br>")
%>
The ConnectString property contains the connect string of the tree when its data source is "ODBC".
Syntax
.ConnectStringReturn Values
Returns a String value.Example
<%
MyTree.ConnectString = "DSN=TREEGEN;UID=TREEGEN_USER;PWD=TREEGEN_PASSWD;DATABASE=TREES"
%>
The SQLSelectString property contains the SQL request used to display the items of a tree.
Available when DataSource = "ODBC"Syntax
.SQLSelectStringReturn Values
Returns a String value.Example
<%
MyTree.SQLSelectString = "SELECT * From Trees"
%>
The SQLCleanString property contains the SQL request which deletes the data of the current tree.
Available when DataSource = "ODBC"Syntax
.SQLCleanStringReturn Values
Returns a String value.Example
<%
MyTree.SQLCleanString = "DELETE * From Trees"
%>
The SQLAddString property contains the SQL request used to add the items of a tree.
Available when DataSource = "ODBC"Syntax
.SQLAddStringReturn Values
Returns a String value.Example
<%
MyTree.SQLAddString = "SELECT * From Trees"
%>
The LoadItems method only loads selected items of the tree. The root is the item with the specified id. The deep of the loaded tree depends of the deep parameter.
Syntax
.LoadItems([IdStart], [deep])Parameters
IdStart (optional) Item ID which becomes the root of the tree.deep (optional) Deep of the loading.
NOTE : LoadItems with no parameter, loads all items of the tree.
Example
This example loads a tree, only on one level. The start item depends on the Request("STARTID") value.
<%
if Request("STARTID")<> "" then
MyTree.LoadItems Cint(Request("STARTID")),1
else
MyTree.LoadItems 1,1
end if
%>
The LoadItemsFromShortCut method only loads the selected items. The root is the item which has the specified shortcut.
Syntax
.LoadItemsFromShortCut(shortCut, [deep])Parameters
ShortCut Item shortcut.deep (optional) Deep of the loading.
Example
<%
if Request("STARTID")<> "" then
MyTree.LoadItems Cint(Request("STARTID")), 1
else
MyTree.LoadItemsFromShortCut "MyShortCut", 1
end if
%>
The SaveItems method saves the items of a tree according to its datasource (TEXT or ODBC).
Syntax
.SaveItemsExamples
<%
MyTree.DataSource = "TEXT"
Mytree.PhysicalPath = "c:\inetpub\intranet\scripts\treegen\trees\mytree.txt"
MyTree.RootItem.Link.Text = "New Text"
MyTree.SaveItems
%>
The ShowDebugInfo method displays all tree and items properties.
Syntax
.ShowDebugInfo()Examples
<%
Response.Write("Here is a full display of the tree :<br>")
MyTree.ShowDebugInfo
%>
The ShowDebugTreeInfo method displays the tree properties.
Syntax
.ShowDebugTreeInfo()Examples
<%
Response.Write("Here are the tree properties :<br>")
MyTree.ShowDebugTreeInfo
%>
The ShowDebugItemInfo method displays the items properties.
Syntax
.ShowDebugItemInfo(oItem)Parameters
oItem : Item objectExamples
<%
Set myItem = MyTree(3)
Response.Write("Here are the item properties :<br>")
MyTree.ShowDebugItemInfo(myItem)
%>
© 1999 Advantys. All rights reserved.