User Guide
314 Chapter 18: Components
How to customize the Component panel
The Dreamweaver Component panel lets users load and work with components. It lists all the
available component types that are compatible with each enabled server model. For instance,
because JavaBeans can work only on a JavaServer Page (JSP), JavaBeans components appear only
in the JSP server model within the Component panel. Likewise, because CFCs can work only
on a ColdFusion page, they appear only in the ColdFusion server model within the
Component panel.
Extensibility lets you add new component types into the panel. After you add the new
components, they appear in the Components pop-up list. You can also add instructions for
setting up components that appear in the Component panel or in a dialog box (depending on the
extension for which the steps are implemented) as numbered steps. The Setup Steps then display
interactively as users load the new components, with check marks appearing next to any
completed step.
Component panel files
The Configuration/Components folder has a subfolder for each implemented server model.
Component files are stored in the Configuration/Components/server-model/ServerType folder.
You can add other server models and supporting server extensions (for more information on
server models, see Chapter 19, “Server Models,” on page 327; for more information on server
behaviors, seeChapter 15, “Server Behaviors,” on page 247).
To create a custom component that can work in the Component panel:
• Create an HTML file identifying the locations of supporting JavaScript and image files.
• Write the JavaScript to enable the component.
• Create, or identify existing, GIF image files to represent the component in the
Component panel.
If you want the component type to appear in a tree control view, you also need to create the
associated optional files and populate the tree control.
You can set a component type to work at the level of an individual web page, to a set of web pages,
or to 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.
The following example shows a data entry in the file JavaBeansList.xml (to be saved in the
multiuser configuration folder) that defines the component class and its location:
<javabeans>
<javabean classname="TestCollection.MusicCollection"
classlocation="d:\music\music.jar"></javabean>
</javabeans>
JavaBeans should contain the logic for saving themselves in the multiuser configuration folder, so
the next time the user launches an application, the component loads itself again from the saved
data file.