User Guide
Component panel API functions 323
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;
}
toolbarControls()
Availability
Dreamweaver MX.
Description
Every component type returns a list of toolBarButtonRec objects, which represents the toolbar
icons, in left-to-right order. Each
toolBarButtonRec object contains the following properties:
Property Name Description
image
Path to image file
disabledImage
Optional; path to disabled image searches for the toolbar button
pressedImage
Optional; path to pressed image searches for the toolbar button
toolTipText
Tooltip for the toolbar button
toolStyle
Left /right
enabled
JavaScript code that returns a Boolean value (true or false). The enablers are
called when the following conditions exist:
• When the
dreamweaver.serverComponents.refresh() function is called
• When the selection in the tree changes
• When server model changes