Results window functions let you interact with the built-in panels in the Results panel group or create a stand-alone window that displays columns of formatted data.

The built-in Results panel group

These functions produce output in the Results panel group. The Results panel group displays tabbed panels for searches, source validation, sitewide reports, browser compatibility checking, server debugging, FTP logging, and link checking.

Specific child panels

The following child panels are built-in Results windows that always exist in the Dreamweaver interface and can be accessed directly.

  • dreamweaver.resultsPalette.siteReports

  • dreamweaver.resultsPalette.validator

  • dreamweaver.resultsPalette.bcc

Because these panels are Results windows, you can use the following methods that are defined for stand-alone Results windows:

  • getItem()

  • getItemCount()

  • getSelectedItem()

  • setSelectedItem()

For more information about using the resWin methods, see A stand-alone results window.

The active child panel

The following general API functions apply to whichever child panel is active. Some child panels might ignore some of these functions. If the active child panel does not support the function, calling it has no effect.

dreamweaver.showResults()

Availability

Dreamweaver MX 2004.

Description

Opens the specified results floating panel and selects the item.

Note:

This function is supported only in the Validation, Browser Compatibility Check, and Site Reports panels of the Results panel group.

Arguments

floaterName, floaterIndex

  • The floaterName argument is a string that specifies the results floating panel to open. Valid values are 'validation', or 'reports'.

  • The floaterIndex argument is a number or string. Use a number to specify the index of an item to select in the Results panel. Use a string to specify the URL of a document. If you specify a URL, the function selects the first visible item for that document.

Returns

Nothing.

Example

The following example checks for errors at the offset of the current selection in the document and, if errors are present, displays them in the specified window (floaterName) of the Results panel. Otherwise, it opens the Browser Compatibility Check window of the Results panel and displays the first visible item for the current document.

 var offset = dw.getDocumentDOM().source.getSelection()[0]; 
var errors = dw.getDocumentDOM().source.getValidationErrorsForOffset(offset); 
if ( errors && errors.length > 0 ) 
    dw.showResults( errors[0].floaterName, errors[0].floaterIndex ); 
else 
    dw.showResults('bcc', dw.getDocumentDOM().URL);

dreamweaver.resultsPalette.siteReports.addResultItem()

Availability

Dreamweaver 4.

Description

Adds a new results entry to the Site Reports panel, based on the information in the file that the processfile() function processes.

This function is only available in the processFile() callback of a site report. For details on site reports, see “Reports” in Extending Dreamweaver.

Arguments

strFilePath, strIcon, strDisplay, strDesc, {iLineNo}, {iStartSel}, {iEndSel}

  • The strFilePath argument is a fully qualified URL path of the file to process.

  • The strIcon argument is the path to the icon to use. To display a built-in icon, use a value "1" through "10" instead of the fully qualified path for the icon (use "0" for no icon). The following table shows the icons that correspond to the values of "1" through "10":

  • The strDisplay argument is the string to display to the user in the first column of the Results window (usually, the filename).

  • The strDesc argument is the description that goes with the entry.

  • The iLineNo argument is the number of lines in the file (optional).

  • The iStartSel argument is the start of offset into the file (optional, but if it is used, the iEndSel argument must also be used.).

  • The iEndSel argument is the end of offset into the file (required if iStartSel is used).

Returns

Nothing.

dreamweaver.resultsPalette.clear()

Availability

Dreamweaver MX.

Description

Clears the contents of the panel in focus.

Arguments

None.

Returns

Nothing.

Enabler

dreamweaver.resultsPalette.Copy()

Availability

Dreamweaver MX.

Description

Sends a copied message to the window that is in focus (often used for the FTP logging window).

Arguments

None.

Returns

Nothing.

Enabler

dreamweaver.resultsPalette.cut()

Availability

Dreamweaver MX.

Description

Sends a cut message to the window in focus (often used for the FTP logging window).

Arguments

None.

Returns

Nothing.

Enabler

dreamweaver.resultsPalette.Paste()

Availability

Dreamweaver MX.

Description

Sends a pasted message to the window in focus (often used for the FTP logging window).

Arguments

None.

Returns

Nothing.

Enabler

dreamweaver.resultsPalette.openInBrowser

Availability

Dreamweaver MX.

Description

Sends a report (Site Reports, Browser Target Check, Validation, and Link Checker) to the default browser.

Arguments

None.

Returns

Nothing.

Enabler

dreamweaver.resultsPalette.openInEditor()

Availability

Dreamweaver MX.

Description

Jumps to the selected line for specific reports (Site Reports, Browser Target Check, Validation, and Link Checker), and opens the document in the editor.

Arguments

None.

Returns

Nothing.

Enabler

dreamweaver.resultsPalette.save()

Availability

Dreamweaver MX.

Description

Opens the Save dialog box for a window that supports the Save function (Site Reports, Browser Target Check, Validation, and Link Checker).

Arguments

None.

Returns

Nothing.

Enabler

dreamweaver.resultsPalette.selectAll()

Availability

Dreamweaver MX.

Description

Sends a Select All command to the window in focus.

Arguments

None.

Returns

Nothing.

Enabler

A stand-alone results window

The dreamweaver.createResultsWindow() function, creates a results window.

dreamweaver.createResultsWindow()

Availability

Dreamweaver 4.

Description

Creates a new Results window and returns a JavaScript object reference to the window.

Arguments

strName, arrColumns

  • The strName argument is the string to use for the window’s title.

  • The arrColumns argument is an array of column names to use in the list control.

Returns

An object reference to the created window.

resWin.addItem()

Availability

Dreamweaver 4.

Description

Adds a new item to the Results window.

Note:

Use only on stand-alone results windows created with dreamweaver.createResultsWindow(). The resWin.addItem() function cannot be used with the built-in results windows, including Validation, Browser Compatibility Check, or Site Reports.

Arguments

resultWindowObj, strIcon, strDesc, itemData, iStartSel, iEndSel, colNdata

  • The resultWindowObj argument is the object that the createResultsWindow() function returns.

  • The strIcon argument is a string that specifies the path to the icon to use. To display a built-in icon, use a value "1" through "10"instead of the fully qualified path of the icon. Specify "0" (zero) for no icon. The following table shows the icons that correspond to the values of "1" through "10":

  • The strDesc argument is a detailed description of the item. Specify "0" if there is no description.

  • The itemData argument is a string you can use to store specific data about the item being added such as a document line number.

  • The iStartSel argument is the start of selection offset in the file. Specify the value null if you are not specifying an offset.

  • The iEndSel argument is the end of selection offset in the file. Specify the value null if you are not specifying an offset.

  • The colNdata argument is an array of strings that provide the data for each column (that is, if there are 3 columns, an array of 3 strings).

Returns

A Boolean value: true if the item was added successfully; false otherwise.

Example

The following example creates a Results window called resWin that has the column headings: Frodo, Sam, and Gollum. The call to the resWin.addItem() function adds a folder icon and then the three strings, msg1, msg2, and msg3 into the three columns defined for the window.

 var resWin = dw.createResultsWindow("Test Window", ["Frodo", "Sam", "Gollum"]); 
resWin.addItem(resWin, "3", "Description", null, null, null, ["msg1", "msg2", "msg3"]);

resWin.getItem()

Availability

Dreamweaver 4.

Description

Retrieves an array of items that include the name of the command that added the item and the same strings that were passed to the addItem() function.

Arguments

itemIndex

  • The itemIndex argument is the index of the item whose data is to be retrieved.

Returns

An array of strings. The first element in the array is the name of the command that added the item; the remaining elements are the same strings that were passed to the addItem() function.

resWin.getItemCount()

Availability

Dreamweaver 4.

Description

Retrieves the number of items in the list.

Arguments

None.

Returns

The number of items in the list.

resWin.getSelectedItem()

Availability

Dreamweaver 4.

Description

Retrieves the index of the selected item.

Arguments

None.

Returns

The index of the currently selected item.

resWin.setButtons()

Availability

Dreamweaver 4.

Description

Sets the buttons specified by the arrButtons argument.

Arguments

cmdDoc, arrButtons

  • The cmdDoc argument is a document object that represents the command that is calling the function. Commands should use the keyword this.

  • The arrButtons argument is an array of strings that correspond to the button text and the JavaScript code to execute when the button is clicked. This is similar to the way the commandButtons() function works for commands. Only two buttons can be set in the window.

Returns

Nothing.

resWin.setCallbackCommands()

Availability

Dreamweaver 4.

Description

Tells the Results window on which commands to call the processFile() method. If this function is not called, the command that created the Results window is called.

Arguments

arrCmdNames

  • The arrCmdNames argument is an array of command names on which to call the processFile() function.

Returns

Nothing.

resWin.setColumnWidths()

Availability

Dreamweaver 4.

Description

Sets the width of each column.

Arguments

arrWidth

  • The arrWidth argument is an array of integers that represents the widths to use for each column in the control.

Returns

Nothing.

resWin.setFileList()

Availability

Dreamweaver 4.

Description

Gives the Results window a list of files, folders, or both to call a set of commands to process.

Arguments

arrFilePaths, bRecursive

  • The arrFilePaths argument is an array of file or folder paths to iterate through.

  • The bRecursive argument is a Boolean value that indicates whether the iteration should be recursive (true) or not (false).

Returns

Nothing.

resWin.setSelectedItem()

Availability

Dreamweaver 4.

Description

Sets the selected item to the one specified by itemIndex.

Arguments

itemIndex

  • The index of the item in the list to select.

Returns

The index of the previously selected item

resWin.setTitle()

Availability

Dreamweaver 4.

Description

Sets the title of the window.

Arguments

strTitle

  • The strTitle argument is the new name of the floating panel.

Returns

Nothing.

resWin.startProcessing()

Availability

Dreamweaver 4.

Description

Starts processing the file.

Arguments

None.

Returns

Nothing.

resWin.stopProcessing()

Availability

Dreamweaver 4.

Description

Stops processing the file.

Arguments

None.

Returns

Nothing.

Server debugging

Dreamweaver can request files from Adobe ColdFusion and display the response in its embedded browser. When the response returns from the server, Dreamweaver searches the response for a packet of XML that has a known signature. If Dreamweaver finds XML with that signature, it processes the XML and displays the contained information in a tree control. This tree displays information about the following items:

  • All templates, custom tags, and include files that are used to generate the rendered CFM page

  • Exceptions

  • SQL queries

  • Object queries

  • Variables

  • Trace trail

Additionally, the Server Debug panel can display debug data from other server models. To set up Dreamweaver to debug other server models, use the dreamweaver.resultsPalette.debugWindow.addDebugContextData() function.

dreamweaver.resultsPalette.debugWindow.addDebugContextData()

Availability

Dreamweaver MX.

Description

Interprets a customized XML file that returns from the server that is specified in the Site Definition dialog box. The contents of the XML file display as tree data in the Server Debug panel, so you can use the Server Debug panel to evaluate server-generated content from various server models.

Arguments

treedata

  • The treedata argument is the XML string that the server returns. The XML string should use the following formatting:

    server debug node

    Root node for the debug XML data

    debugnode

    Corresponds to every node

    context

    Name of item that appears in the context list

    icon

    Icon to use for tree node

    name

    Name to display

    value

    Value to display

    timestamp

    Only applicable to context node

    The following strings are optional:

    jumptoline

    Link to a specific line number

    template

    Name of the template file part of the URL

    path

    Path of the file from server point of view

    line number

    Line number within the file

    start position

    Opening character offset within the line

    end position

    Ending character offset within the line

    For example:

     <serverdebuginfo> <context> <template><![CDATA[/ooo/master.cfm]]></template> <path><![CDATA[C:\server\wwwroot\ooo\master.cfm]]></path> <timestamp><![CDATA[0:0:0.0]]></timestamp> </context> <debugnode> <name><![CDATA[CGI]]></name> <icon><![CDATA[ServerDebugOutput/ColdFusion/CGIVariables.gif]]></icon> <debugnode> <name><![CDATA[Pubs.name.sourceURL]]></name> <icon><![CDATA[ServerDebugOutput/ColdFusion/Variable.gif]]></icon> <value><![CDATA[jdbc:Macromedia:sqlserver: //name.Macromedia.com:1111;databaseName=Pubs]]></value> </debugnode> </debugnode> <debugnode> <name><![CDATA[Element Snippet is undefined in class coldfusion.compiler.TagInfoNotFoundException]]></name> <icon><![CDATA[ServerDebugOutput/ColdFusion/Exception.gif]]></icon> <jumptoline linenumber="3" startposition="2" endposition="20"> <template><![CDATA[/ooo/master.cfm]]></template> <path><![CDATA[C:\Neo\wwwroot\ooo\master.cfm]]></path> </jumptoline> </debugnode> </serverdebuginfo>

Returns

Nothing.

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy