getSetupSteps()

Availability

Adobe Dreamweaver MX.

Description

Adobe Dreamweaver calls this function if the setupStepsCompleted() function returns zero or a positive integer. This function controls the server-side setup instructions, which can be implemented using extensions that use a modal dialog box and extensions that use server components.

This function returns an array of the strings for Adobe Dreamweaver to display in either the Setup Steps dialog box or the Components panel, depending on the extension type.

Arguments

None.

Returns

An array of n+1 strings, where n is the number of steps, as described in the following list:

  • The title that appears above the list of setup steps
  • For each step, the text instructions, which can include any HTML markup that is legal inside a li tag

You can include hypertext links (a tags) in the list of steps by using the following form:

<a href="#" onMouseDown="handler">Blue Underlined Text</a>

The "handler" value can be replaced by any of the following strings or any JavaScript expression, such as "dw.browseDocument('http://www.macromedia.com')":

  • An "Event:SetCurSite" handler opens a dialog box to set the current site.
  • An "Event:CreateSite" handler opens a dialog box to create a new site.
  • An "Event:SetDocType" handler opens a dialog box to change the document type of the user's document.
  • An "Event:CreateConnection" handler opens a dialog box to create a new database connection.
  • An "Event:SetRDSPassword" handler opens a dialog box to set the Remote Development Service (RDS) user name and password (ColdFusion only).
  • An "Event:CreateCFDataSource" handler opens the ColdFusion administrator in a browser.

Example

The following example sets four steps for ColdFusion components, and provides a hypertext link in the fourth step so the user can enter the RDS user name and password:

function getSetupSteps(){ var doSDK = false; dom = dw.getDocumentDOM(); if (dom && dom.serverModel) { var aServerModelName = dom.serverModel.getDisplayName(); } else { var aServerModelName = site.getServerDisplayNameForSite(); } if (aServerModelName.length) { if(aServerModelName != "ColdFusion") { if(needsSDKInstalled != null) { doSDK = needsSDKInstalled(); } } } var someSteps = new Array(); someSteps.push(MM.MSG_WebService_InstructionsTitle); someSteps.push(MM.MSG_Dynamic_InstructionsStep1); someSteps.push(MM.MSG_Dynamic_InstructionsStep2); if(doSDK == true) { someSteps.push(MM.MSG_WebService_InstructionsStep3); } someSteps.push(MM.MSG_WebService_InstructionsStep4); return someSteps;}