dwr.util.addRows(id, array, cellfuncs, [options]);

Adds rows to a table element specified by id. It takes it's data from an array and creates a row in the table for each entry in the array. A column is created for each function in the cellfuncs array. The cells are created by passing each array entry to each 'cellfunc' in turn. For worked examples see the tables documentation.

As of DWR 1.1, addRows() also works with objects. If you pass in an object in place of an array we will create cells by passing object values to the cell functions.

You could write some pseudo-code that looks something like this:

for each member in array
  for each function in cellfuncs
    create cell from cellfunc(array[i])

By default DWR protects against XSS in dwr.util.addRows by performing output escaping. The optional options object parameter allows output escaping to be disabled. Please see the escapeHtml page for more information.


From DWR 1.1, the options available are: