beautypg.com

Customizing the components panel, Customizing components panel files – Adobe Extending Dreamweaver CS4 User Manual

Page 316

background image

310

EXTENDING DREAMWEAVER CS4

Components

In some cases, writing some JavaScript code that calls certain component-related function, is a must for altering files.

Customizing the Components panel

The Dreamweaver Components panel lets users load and work with components. It lists all the available component
types that are compatible with each enabled server model. For example, CFCs can work only on an Adobe ColdFusion
page; they appear only in the Adobe ColdFusion server model within the Components panel.

Extensibility lets you add new component types to the panel. Follow several general steps when adding a new
component type to the Components panel:

1

Add the component to the list of available component types for the appropriate server models.

2

Add instructions for setting up the component in the Components panel or in a dialog box (depending on the
extension for which the steps are implemented). The instructions are also known as setup steps, and appear as
interactive numbered steps. Make sure that check marks appear next to any steps the user has completed.

3

List the components of the component type that exist either on the computer of the user or in the current site only.

4

Create a component when the user clicks the Plus (+) button in the Components panel.

In addition, you can enable the user to edit a component and delete a component.

Customizing Components panel files

The Configuration/Components folder has a subfolder for each implemented server model. Component files are
stored in the Configuration/Components/server-model/ComponentType folder. You can add other server models and
supporting server extensions (for more information, see “

Server models

” on page 322 and

Server behaviors

” on

page 246).

Create a custom component that can work in the Components panel

1

Create an HTML file that identifies the locations of supporting JavaScript and image files.

2

Write the JavaScript to enable the component.

3

Create or identify existing GIF image files to represent the component in the Components panel.

To make the component type appear in a tree control view, create the associated optional files and populate the tree
control.

You can set a component type to work at three levels: individual web page, set of web pages, or an entire site. Your
JavaScript code must include the logic for component persistence—for saving itself between sessions and reloading at
the start of a new session.

Add a new lightweight directory access protocol (LDAP) service component

1

Using existing component type files as a model (such as the files in the application folder
Configuration/Components/Common/WebServices), create all the required files, plus the desired optional files, to
display the new component type in the Dreamweaver Components panel, as shown in the following table:

This manual is related to the following products: