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.
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.
The following child panels are built-in Results windows that always exist in the Dreamweaver interface and can be accessed directly.
Because these panels are Results windows, you can use the following methods that are defined for stand-alone Results windows:
For more information about using the resWin methods, see A stand-alone results window.
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.
This function is supported only in the Validation, Browser Compatibility Check, and Site Reports panels of the Results panel group.
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.
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(); var errors = dw.getDocumentDOM().source.getValidationErrorsForOffset(offset); if ( errors && errors.length > 0 ) dw.showResults( errors.floaterName, errors.floaterIndex ); else dw.showResults('bcc', dw.getDocumentDOM().URL);
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.
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).
Sends a report (Site Reports, Browser Target Check, Validation, and Link Checker) to the default browser.
Jumps to the selected line for specific reports (Site Reports, Browser Target Check, Validation, and Link Checker), and opens the document in the editor.
Opens the Save dialog box for a window that supports the Save function (Site Reports, Browser Target Check, Validation, and Link Checker).
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.
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.
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).
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"]);
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.
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.
The cmdDoc argument is a document object that represents the command that is calling the function. Commands should use the keyword this.
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.
The arrWidth argument is an array of integers that represents the widths to use for each column in the control.
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).
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
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.
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.
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
Corresponds to every node
Name of item that appears in the context list
Icon to use for tree node
Name to display
Value to display
Only applicable to context node
The following strings are optional:
Link to a specific line number
Name of the template file part of the URL
Path of the file from server point of view
Line number within the file
Opening character offset within the line
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>