tigrang / cakephp-datatable

JQuery DataTable plugin server-side processing component for CakePHP
47 stars 29 forks source link

Not working for admin prefix #70

Open faizplus opened 8 years ago

faizplus commented 8 years ago

First of all, I would like to thank you for your great effort for making this plugin. This is working fine on all actions without prefix but when i try to add same data table in admin panel like 'admin_index' action it goes looking for admin_processDataTableRequest function which fails.

I renamed the function in the trait from processDataTableRequest to admin_processDataTableRequest and it is working fine but is there any other way to do that?

tigrang commented 8 years ago

Are you using the helper to generate the table/javascript?

faizplus commented 8 years ago

yes i am using public $helpers = [ 'DataTable.DataTable' ];

tigrang commented 8 years ago

Can you try adding this to the helper config:

'js' => array(
    'sAjaxSource' => array('action' => 'processDataTableRequest', 'prefix' => false),
),
tigrang commented 8 years ago

@faizplus did the above work for you?