Wiki

Clone wiki

grails-datatables / reportAction

reportAction

Values

Name Type Default
reportAction String None

Description

reportAction is a table option that allows you to specify a custom action that will be used to supply the report data via AJAX. This option only applies when using serverSide or serverDataLoad, and when reportingEnabled is true.

The default behavior for a table report is for the GrailsDataTables plugin to supply the data using its own controller built into the plugin. If you provide your own custom controller, you can return whatever data you like.

Note that if the reportAction option is set, then the controller option must also be set.

You may also include custom parameters in the AJAX requests by using the ajaxParams option.

The format of the request is the same as the request for table data described here. You may choose to simply ignore the pagination info when compiling a report.

Example

<dt:datatable name="MyTable" serverSide="true" controller="myController" dataAction="myDataAction" reportAction="myReportAction" reportButton="true">
    <dt:column name="myFirstColumn"/>
    <dt:column name="mySecondColumn"/>
</dt:datatable>

See Also

serverSide, serverDataLoad, dataAction, reportingEnabled, ajaxParams


Back to Options.

Updated