User Guide

WddxRecordset object 793
WddxRecordset object
Includes functions that you call as needed when constructing a WDDX record set.
Functions
:
Returns
HTML table of the WddxRecordset object data.
Usage
Convenient for debugging and testing record sets. The boolean parameter escapeStrings
determines whether
<>& characters in string values are escaped as &lt;&gt;&amp; in HTML.
Example
<!--- Create a simple query --->
<cfquery name = "q" datasource ="cfsnippets">
SELECT Message_Id, Thread_id, Username, Posted
FROM messages
</cfquery>
<!--- Load the wddx.js file, which includes the dump function --->
<script type="text/javascript" src="/CFIDE/scripts/wddx.js"></script>
<script>
// Use WDDX to move from CFML data to JS
<cfwddx action="cfml2js" input="#q#" topLevelVariable="qj">
// Dump the record set
document.write(qj.dump(true));
</script>
addColumn
Description
Adds a column to all rows in a WddxRecordset instance.
Syntax
object.addColumn( name )
Function syntax Description
object.addColumn(name)
Adds a column to all rows in a WddxRecordset instance.
object.addRows(n)
Adds rows to all columns in a WddxRecordset instance.
object.dump(escapeStrings)
Displays WddxRecordset object data.
object.getField(row, col)
Returns the element in a row/column position.
object.getRowCount()
Indicates the number of rows in a WddxRecordset
instance.
object.setField(row, col, value)
Sets the element in a row/column position.
object.wddxSerialize(serializer)
Serializes a record set.