selectionChanged:undefined,//An optional handler called when the selection changes, and passed the selected element (jquery wrapper for the table row 'tr' HTML element currently selected), and the model associated with the row.
supportingData:[],//An array of objects, one for each collection of supporting data. Each object must have a 'name', 'url', and optional 'parameters'. The url and parameters are used the same as for the primary query. The name is used to store the results for use in rendering the data. Optional 'postProcess' attribute can be a function that takes the data and returns a modified set of data.
cellDataHandlers:{},//An object containing a function for each attribute, where the attribute is the table header object key, and the function is called to convert the primary data object into a cell value. The function will be passed the jquery table data wrapper object for the cell, the primary data object for the row, and the object containing the supporting data returned from running the supporting data queries.
postAddRowHandler:null,//Optional function that is passed the jquery table row and the data object sent by the server for that row. Allows post processing of the row prior to display.
parameters:null//Optional function that returns an object, or an object whose attributes are passed to the URL as parameters.
//Note that each row of the table will have a data element attached to the table row. The key will be "model" and the value will be the object sent by the server.
//Use apply to convert an array of parameters to individual parameters for the $.when(..) function. The success function will receive the results in order passed to when().
//Note: If there is only one query, then the argument array contains the results for the one query, otherwise the argument array is an array of result arrays, one for each query.
vardata=(deferreds.length>1?arguments[0][0]:arguments[0]);//Note: For multiple queries, the result of the first query returns an array of three values: the data (array in this case), the message, and XHR object. We only care about the data.
//Call the optional handler after adding the row, passing the jquery row object, and the row data object sent by the server. Allows post processing on the row (adding classes to the row for example).