Populating the tree control
Use the
ComponentRec
within the Component panel in the proper location. Every node in a tree control must have the
following properties:
Property name
name
image
hasChildren
toolTipText
isCodeViewDraggable
isDesignViewDraggable
For example, the following WebServicesClass node has web methods as its children:
this.name = "TrafficLocatorWebService";
this.image
= "Components/Common/WebServices/WebServices.gif";
this.hasChildren = true;
this.toolTipText = "TrafficLocatorWebService";
this.isCodeViewDraggable = true;
// the following allows of enabling/disabling of the button that appears
// above the Component Tree
this.allowDelete = true;
this.isDesignViewDraggable = false;
Component panel API functions
This section describes the API functions for populating the Component panel.
getComponentChildren()
Availability
Dreamweaver MX.
Description
This function returns a list of child
object. To load the root-level tree items, this function needs to read its metadata from its
persistent store.
Arguments
{parentComponentRec}
•
The
parentComponentRec
omitted, Dreamweaver expects a list of
316
Chapter 18: Components
property to populate a Component panel tree control, so that it appears
Description
Name of the tree node item
Icon of the tree node item. If it is not specified, a default
icon is used.
Responds to clicks on the Plus (+) and Minus (-)
buttons in the tree control by loading children.You can
work with a tree that is not prepopulated.
Tooltip text of the tree node item
Determines whether the item can be dragged and
dropped into the Code view.
Determines whether the item can be dragged and
dropped into the Design view.
ComponentRec
argument is the
ComponentRec
objects for the active parent
object of the parent. If it is
componentRec
objects for the root node.
Required/
Optional
Required
Optional
Required
Optional
Optional
Optional
ComponentRec
Need help?
Do you have a question about the DREAMWEAVER MX 2004-EXTENDING DREAMWEAVER and is the answer not in the manual?