handleDoubleClick()
Availability
Adobe Dreamweaver MX.
Description
When the user double-clicks the node in the tree, the event handler is called to allow editing. This function is optional. The function can return a false value, which indicates that the event handler is not defined. In this case, double-clicking causes the default behavior, which expands or collapses the tree nodes.
Arguments
componentRec
- The
componentRecargument is an object that contains the following properties:- The
nameproperty is the name of the tree node item. - The
imageproperty is an optional icon for the tree node item. If this icon is omitted, Adobe Dreamweaver uses a default icon. - The
hasChildrenproperty is a Boolean value that indicates whether the tree node item is expandable: iftrue, Adobe Dreamweaver displays the Plus (+) and Minus (-) buttons for the tree node item; iffalse,the item is not expandable. - The
toolTipTextproperty is an optional tooltip text for the tree node item. - The
isCodeViewDraggableproperty is a Boolean value that indicates whether the tree node item can be dragged and dropped into Code view. - The
isDesignViewDraggableproperty is a Boolean value that indicates whether the tree node item can be dragged and dropped into Design view.
- The
Returns
Nothing.
Example
In the following example, the extension has a chance to handle a double-click on the tree node item; if it returns the value false, the default behavior is to expand/collapse the nodes.
function handleDoubleClick(componentRec){ var selectedObj = dw.serverComponentsPalette.getSelectedNode(); if(dwscripts.IS_WIN) { if (selectedObj && selectedObj.wsRec && selectedObj.wsRec[ProxyGeneratorNamePropName]) { if (selectedObj.objectType == "Root") { editWebService(); return true; } else if (selectedObj.objectType == "MissingProxyGen") { displayMissingProxyGenMessage(componentRec); editWebService(); return true; } } } return false;}