Wiki

Clone wiki

grails-datatables / dataAction

dataAction

Values

Name Type Default
dataAction String None

Description

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

The default behavior for a table that uses AJAX to obtain the table data from the server 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 dataAction 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 and response is described here.

Example

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

See Also

serverSide, serverDataLoad, reportAction, ajaxParams


Back to Options.

Updated